From aa938a1b3cd39748fea679a7b05749ac47176de1 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 18 Apr 2023 11:28:23 +0530 Subject: [PATCH] refactor: revert loginRootUser method Signed-off-by: Pranav C --- .../test/TestResetService/index.ts | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/packages/nocodb-nest/src/controllers/test/TestResetService/index.ts b/packages/nocodb-nest/src/controllers/test/TestResetService/index.ts index 0da97fbe4a..d407a6b6a9 100644 --- a/packages/nocodb-nest/src/controllers/test/TestResetService/index.ts +++ b/packages/nocodb-nest/src/controllers/test/TestResetService/index.ts @@ -13,29 +13,12 @@ import resetMetaSakilaSqliteProject from './resetMetaSakilaSqliteProject'; const workerStatus = {}; const loginRootUser = async () => { - try { - const response = await axios.post( - 'http://localhost:8080/api/v1/auth/user/signin', - { email: 'user@nocodb.com', password: 'Password123.' }, - ); - - return response.data.token; - } catch (e) { - console.log('Error in loginRootUser', e); - const msg = - e.response?.data?.msg || - e.response?.data?.message || - 'Some internal error occurred'; - const errors = e.response?.data?.errors; - console.log('msg', msg); - console.log('errors', errors); - const response = await axios.post( - 'http://localhost:8080/api/v1/auth/user/signup', - { email: 'user@nocodb.com', password: 'Password123.' }, - ); - - return response.data.token; - } + const response = await axios.post( + 'http://localhost:8080/api/v1/auth/user/signin', + { email: 'user@nocodb.com', password: 'Password123.' }, + ); + + return response.data.token; }; const projectTitleByType = {