diff --git a/src/data-seeding/employees/handler.ts b/src/data-seeding/employees/handler.ts index 59aee343b..09198a79b 100644 --- a/src/data-seeding/employees/handler.ts +++ b/src/data-seeding/employees/handler.ts @@ -8,12 +8,15 @@ * * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS. */ +import { QA_ENV } from '@countryconfig/constants' import { readCSVToJSON } from '@countryconfig/utils' import { Request, ResponseToolkit } from '@hapi/hapi' export async function usersHandler(_: Request, h: ResponseToolkit) { const users: unknown[] = await readCSVToJSON( - './src/data-seeding/employees/source/default-employees.csv' + process.env.NODE_ENV === 'production' && !QA_ENV + ? './src/data-seeding/employees/source/prod-employees.csv' + : './src/data-seeding/employees/source/test-employees.csv' ) return h.response(users) } diff --git a/src/data-seeding/employees/source/prod-employees.csv b/src/data-seeding/employees/source/prod-employees.csv new file mode 100644 index 000000000..41a93368c --- /dev/null +++ b/src/data-seeding/employees/source/prod-employees.csv @@ -0,0 +1,2 @@ +primaryOfficeId,givenNames,familyName,systemRole,role,mobile,username,email,password +CRVS_OFFICE_JWMRGwDBXK,Euan,Millar,NATIONAL_SYSTEM_ADMIN,National System Admin,,e.millar,opencrvscountryconfig@gmail.com,test \ No newline at end of file diff --git a/src/data-seeding/employees/source/default-employees.csv b/src/data-seeding/employees/source/test-employees.csv similarity index 100% rename from src/data-seeding/employees/source/default-employees.csv rename to src/data-seeding/employees/source/test-employees.csv