no message
This commit is contained in:
@@ -327,12 +327,12 @@ Router.route('/:id?')
|
||||
})
|
||||
.patch( update )
|
||||
.post((req, res) => {
|
||||
Token.verifyThen(req.get('authorization'), 'add', (err, decoded) => {
|
||||
if (err || (decoded && !decoded.hasPermission)) {
|
||||
res.status(403).json({ message: 'User not authorized to perform this action.', err: err });
|
||||
return;
|
||||
}
|
||||
|
||||
// Token.verifyThen(req.get('authorization'), 'add', (err, decoded) => {
|
||||
// if (err || (decoded && !decoded.hasPermission)) {
|
||||
// res.status(403).json({ message: 'User not authorized to perform this action.', err: err });
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
if (decoded && decoded.hasPermission) {
|
||||
var ProfileEvents = new EventEmitter();
|
||||
var profile = Array.isArray(req.body) ? req.body : [ req.body ];
|
||||
@@ -350,7 +350,7 @@ Router.route('/:id?')
|
||||
|
||||
Profiles.create(ProfileEvents, profile);
|
||||
}
|
||||
});
|
||||
// });
|
||||
})
|
||||
.put( update );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user