Pass invitor object when reinviting user

This commit is contained in:
Girish Ramakrishnan
2016-10-13 15:57:58 -07:00
parent 49f7fb552b
commit 1c22cb8443
2 changed files with 4 additions and 3 deletions

View File

@@ -171,7 +171,7 @@ function requireAdmin(req, res, next) {
function sendInvite(req, res, next) {
assert.strictEqual(typeof req.params.userId, 'string');
user.sendInvite(req.params.userId, function (error, result) {
user.sendInvite(req.params.userId, { invitor: req.user }, function (error, result) {
if (error && error.reason === UserError.NOT_FOUND) return next(new HttpError(404, 'User not found'));
if (error) return next(new HttpError(500, error));