no message
This commit is contained in:
@@ -38,13 +38,13 @@ function processQueryParams (params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function update (req, res, next) {
|
function update (req, res, next) {
|
||||||
Token.verifyThen(req.get('authorization'), 'update', (err, decoded) => {
|
// Token.verifyThen(req.get('authorization'), 'update', (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 id = req.params.id;
|
var id = req.params.id;
|
||||||
var data = req.body;
|
var data = req.body;
|
||||||
@@ -65,8 +65,8 @@ function update (req, res, next) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Profiles.update(ProfileEvents, id, data);
|
Profiles.update(ProfileEvents, id, data);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateMessage (req, res, next) {
|
function updateMessage (req, res, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user