no message

This commit is contained in:
2018-03-09 01:45:07 -05:00
parent c1e0e0aefd
commit b5dbff0b33
9 changed files with 18 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

BIN
images/message/avery_nick.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

BIN
images/message/cologne.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
images/message/img033.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

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