add eventlog hooks

This commit is contained in:
Girish Ramakrishnan
2016-04-30 13:56:03 -07:00
parent 934abafbd4
commit 71219c6af7
8 changed files with 50 additions and 12 deletions
+3
View File
@@ -7,6 +7,7 @@ exports = module.exports = {
};
var assert = require('assert'),
eventlog = require('../eventlog.js'),
groups = require('../groups.js'),
HttpError = require('connect-lastmile').HttpError,
HttpSuccess = require('connect-lastmile').HttpSuccess,
@@ -54,6 +55,8 @@ function update(req, res, next) {
if (error && error.reason === UserError.NOT_FOUND) return next(new HttpError(404, 'User not found'));
if (error) return next(new HttpError(500, error));
eventlog.add(eventlog.ACTION_PROFILE, req, { });
next(new HttpSuccess(204));
});
}