Remove dead code
This commit is contained in:
@@ -9,7 +9,6 @@ exports = module.exports = {
|
||||
del
|
||||
},
|
||||
|
||||
dashboardLoginCallback,
|
||||
destroyUserSession
|
||||
};
|
||||
|
||||
@@ -111,17 +110,6 @@ async function del(req, res, next) {
|
||||
next(new HttpSuccess(204));
|
||||
}
|
||||
|
||||
async function dashboardLoginCallback(req, res, next) {
|
||||
const [error, token] = await safe(tokens.add({ clientId: tokens.ID_WEBADMIN, identifier: req.user.id, expires: Date.now() + constants.DEFAULT_TOKEN_EXPIRATION_MSECS }));
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
await eventlog.add(req.user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: req.user.id, user: users.removePrivateFields(req.user) });
|
||||
|
||||
if (!req.user.ghost) safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource), { debug });
|
||||
|
||||
next(new HttpSuccess(200, token));
|
||||
}
|
||||
|
||||
async function destroyUserSession(req, res, next) {
|
||||
assert.strictEqual(typeof req.user, 'object');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user