Generate the user invite link only in one location
This commit is contained in:
@@ -124,10 +124,10 @@ function verifyPassword(req, res, next) {
|
||||
function createInvite(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.userId, 'string');
|
||||
|
||||
users.createInvite(req.params.userId, function (error, resetToken) {
|
||||
users.createInvite(req.params.userId, function (error, result) {
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, { resetToken: resetToken }));
|
||||
next(new HttpSuccess(200, result));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user