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