no message

This commit is contained in:
2018-03-08 00:54:03 -05:00
parent 448b4f4355
commit c089c36ef5

View File

@@ -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 );