From 148f0a77bd384c348c7822a60be49183ad09cb46 Mon Sep 17 00:00:00 2001 From: Danya Date: Fri, 3 Nov 2023 22:16:31 +0300 Subject: [PATCH] change script for insert data for auth test in ESLint format --- src/tests/utils/insert-data.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/tests/utils/insert-data.ts b/src/tests/utils/insert-data.ts index 684f32a7..5aec8bcb 100644 --- a/src/tests/utils/insert-data.ts +++ b/src/tests/utils/insert-data.ts @@ -2,7 +2,7 @@ import type SequelizeOrm from '@repository/storage/postgres/orm/index.js'; import users from '../test-data/users.json'; import notes from '../test-data/notes.json'; import noteSettings from '../test-data/notes-settings.json'; -import tokens from '../test-data/tokens.json' +import tokens from '../test-data/tokens.json'; /** * Fills in the database with users data @@ -43,10 +43,9 @@ async function insertNoteSettings(db: SequelizeOrm): Promise { * @param db - SequelizeOrm instance */ async function insertTokens(db:SequelizeOrm): Promise { - for(const token of tokens){ - await db.connection.query(`INSERT INTO public.user_sessions("id","user_id","refresh_token","refresh_token_expires_at") VALUES (${token.Id}, ${token.user_Id}, '${token.refreshToken}', '${token.refresh_token_expires_at}')`) + for (const token of tokens) { + await db.connection.query(`INSERT INTO public.user_sessions("id","user_id","refresh_token","refresh_token_expires_at") VALUES (${token.Id}, ${token.user_Id}, '${token.refreshToken}', '${token.refresh_token_expires_at}')`); } - } /**