Browse Source

fix: try signup on failure

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

9
packages/nocodb-nest/src/modules/test/TestResetService/index.ts

@ -13,12 +13,21 @@ 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) {
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