mailer: fix error handling
previous mailer code has no callback and thus no way to pass back errors. now with asyncification it passes back the error
This commit is contained in:
@@ -63,7 +63,7 @@ async function login(req, res, next) {
|
||||
|
||||
eventlog.add(eventlog.ACTION_USER_LOGIN, auditSource, { userId: req.user.id, user: users.removePrivateFields(req.user) });
|
||||
|
||||
await safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource));
|
||||
safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource));
|
||||
|
||||
next(new HttpSuccess(200, token));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user