From 0036a2808a1bd4989ba59aec47b08b34843a648e Mon Sep 17 00:00:00 2001 From: Leandro Menezes Date: Fri, 4 Oct 2024 15:09:55 -0300 Subject: [PATCH] linter --- src/accounts/password.js | 10 +++++++--- src/app-admin.test.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/accounts/password.js b/src/accounts/password.js index 166c90bcc..2fb770d68 100644 --- a/src/accounts/password.js +++ b/src/accounts/password.js @@ -47,7 +47,9 @@ export function loginWithPassword(password) { let token = sessionRow ? sessionRow.token : uuid.v4(); - let { totalOfUsers } = accountDb.first('SELECT count(*) as totalOfUsers FROM users'); + let { totalOfUsers } = accountDb.first( + 'SELECT count(*) as totalOfUsers FROM users', + ); let userId = null; if (totalOfUsers === 0) { userId = uuid.v4(); @@ -56,7 +58,8 @@ export function loginWithPassword(password) { [userId, '', ''], ); - const { id: adminRoleId } = accountDb.first('SELECT id FROM roles WHERE name = ?', ['Admin']) || {}; + const { id: adminRoleId } = + accountDb.first('SELECT id FROM roles WHERE name = ?', ['Admin']) || {}; if (!adminRoleId) { return { error: 'administrator-role-not-found' }; @@ -81,7 +84,8 @@ export function loginWithPassword(password) { finalConfig.token_expiration != 'openid-provider' && typeof finalConfig.token_expiration === 'number' ) { - expiration = Math.floor(Date.now() / 1000) + finalConfig.token_expiration * 60; + expiration = + Math.floor(Date.now() / 1000) + finalConfig.token_expiration * 60; } if (!sessionRow) { diff --git a/src/app-admin.test.js b/src/app-admin.test.js index f17c208b9..203f6e2cc 100644 --- a/src/app-admin.test.js +++ b/src/app-admin.test.js @@ -381,4 +381,4 @@ describe('/admin', () => { }); }); }); -}); \ No newline at end of file +});