@Giggiux I resolve. My problem is that I close the console with ctrl+z and I must close the console with ctrl+c. I think that the first doesn't close all ports of nodebb !
Doppy
Posts
-
ERROR listen eaddrinuse when I reload for the second time the forum -
What do you mean like "moderator"?I need to became an user into "categories moderator". So I go in my:
http://192.168.56.101:4567/admin/manage/categories/1#privileges
and I add new user for the first category and I check the checkbox under moderate so I think the user become moderator of the first category. Now I my code I need to understand if a user is a moderator of any category.
categories.getAllCategories(data.uid, function(err, category) { if (err) { return callback(err); } privileges.users.isModerator(category, data.uid, function(err, isModerator) { if (err) { return callback(err); } console.log("IS MODERATOR "+JSON.stringify(isModerator)); }); });
When I print the value "isModerator" I see all false for all categories in the forum. Anyone can help to understand how I user can became "moderator"?And a groups moderator exists?
-
How add another route with another .tpl file@frissdiegurke said:
params.router.get('/user/plugins/answer/home', params.middleware.buildHeader, controllers.renderTest);
@frissdiegurke thanks!!!! It workss fine!
-
number is not a function in async -
How get all Users when the plugins is installedI need to get all users when that plugin is installed so I used this hook ( in my plugin.json):
"hook": "action:plugin.activate", "method": "caricaVecchiBookmark"
In my library.js
converter.caricaVecchiBookmark = function(data, callback) { console.log("ENTRARE QUI DENTRO"); async.waterfall([ function(next) { db.getSortedSetRangeWithScores('username:uid', start, stop, next); } ], function(err, array_uid) { if (err) { return callback(err); } console.log("ARRAY UDI " + JSON.stringify(array_uid)); return callback(null,data); }); };
The problem is that in the shell I can't read the console.log and I don't know why. When I click the activate button in my admin panel, I don't read the console.log. Anyone can help me?