mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
make all admin routes only accesible to admins
This commit is contained in:
@@ -62,6 +62,22 @@ var DebugRoute = function(app) {
|
||||
res.send('pruned');
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/reindex', function (req, res) {
|
||||
topics.reIndexAll(function (err) {
|
||||
if (err) {
|
||||
return res.json(err);
|
||||
}
|
||||
|
||||
user.reIndexAll(function (err) {
|
||||
if (err) {
|
||||
return res.json(err);
|
||||
} else {
|
||||
res.send('Topics and users reindexed');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user