Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lelemm committed Oct 4, 2024
1 parent 026d8b9 commit 0036a28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/accounts/password.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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' };
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/app-admin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,4 @@ describe('/admin', () => {
});
});
});
});
});

0 comments on commit 0036a28

Please sign in to comment.