mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
moved upload route into API namespace
This commit is contained in:
@@ -154,13 +154,11 @@ middleware.checkAccountPermissions = function(req, res, next) {
|
||||
return res.redirect('/login?next=' + req.url);
|
||||
}
|
||||
|
||||
// this function requires userslug to be passed in. todo: /user/uploadpicture should pass in userslug I think
|
||||
user.getUidByUserslug(req.params.userslug, function (err, uid) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
// not sure if this check really should belong here. also make sure we're not doing this check again in the actual method
|
||||
if (!uid) {
|
||||
if (res.locals.isAPI) {
|
||||
return res.json(404, 'not-found');
|
||||
|
||||
Reference in New Issue
Block a user