mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
new middleware to add slug to topic and category
This commit is contained in:
@@ -18,16 +18,6 @@ topicsController.get = function(req, res, next) {
|
||||
uid = req.user ? req.user.uid : 0,
|
||||
privileges;
|
||||
|
||||
if (!req.params.slug && !res.locals.isAPI) {
|
||||
topics.getTopicField(tid, 'slug', function(err, slug) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
res.redirect('/topic/' + slug);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
threadTools.privileges(tid, ((req.user) ? req.user.uid || 0 : 0), function(err, userPrivileges) {
|
||||
|
||||
Reference in New Issue
Block a user