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:
Girish Ramakrishnan
2021-08-19 12:32:23 -07:00
parent ada7166bf8
commit 4cd5137292
10 changed files with 176 additions and 244 deletions

View File

@@ -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));
}