Browse Source

refactor: revert loginRootUser method

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
aa938a1b3c
  1. 17
      packages/nocodb-nest/src/controllers/test/TestResetService/index.ts

17
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 projectTitleByType = {

Loading…
Cancel
Save