no message
BIN
images/message/2018-03-06-Brian-23.jpg
Normal file
|
After Width: | Height: | Size: 358 KiB |
BIN
images/message/2018-03-06-Brian-32.jpg
Normal file
|
After Width: | Height: | Size: 424 KiB |
BIN
images/message/IMG_20171119_011320.jpg
Normal file
|
After Width: | Height: | Size: 427 KiB |
BIN
images/message/avery_nick.jpg
Executable file
|
After Width: | Height: | Size: 372 KiB |
BIN
images/message/cologne.jpg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
images/message/img033.jpg
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
images/profile/profile-b-001_detail.jpg
Executable file
|
After Width: | Height: | Size: 275 KiB |
BIN
images/profile/profile-b-001_thumbnail.jpg
Executable file
|
After Width: | Height: | Size: 72 KiB |
@@ -38,13 +38,13 @@ function processQueryParams (params) {
|
||||
}
|
||||
|
||||
function update (req, res, next) {
|
||||
// Token.verifyThen(req.get('authorization'), 'update', (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) {
|
||||
Token.verifyThen(req.get('authorization'), 'update', (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 id = req.params.id;
|
||||
var data = req.body;
|
||||
@@ -65,8 +65,8 @@ function update (req, res, next) {
|
||||
});
|
||||
|
||||
Profiles.update(ProfileEvents, id, data);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateMessage (req, res, next) {
|
||||
@@ -327,13 +327,13 @@ 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;
|
||||
}
|
||||
|
||||
if (decoded && decoded.hasPermission) {
|
||||
// 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 ];
|
||||
var multi = profile.length > 1;
|
||||
@@ -349,8 +349,8 @@ Router.route('/:id?')
|
||||
});
|
||||
|
||||
Profiles.create(ProfileEvents, profile);
|
||||
}
|
||||
});
|
||||
// }
|
||||
// });
|
||||
})
|
||||
.put( update );
|
||||
|
||||
|
||||