feat: add DISABLE_SEED_USER to bypass yarn db:seed:user command

This commit is contained in:
Ali BARIN
2024-05-07 13:55:55 +00:00
parent 5aeb4f8809
commit fc4561221d
2 changed files with 9 additions and 0 deletions

View File

@@ -21,6 +21,14 @@ export async function createUser(
email = 'user@automatisch.io',
password = 'sample'
) {
if (appConfig.disableSeedUser) {
logger.info('Seed user is disabled.');
process.exit(0);
return;
}
const UNIQUE_VIOLATION_CODE = '23505';
const role = await fetchAdminRole();