@peopl-health/nexus 1.7.10 → 1.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -90,7 +90,10 @@ const getInfoAssistantController = async (req, res) => {
|
|
|
90
90
|
|
|
91
91
|
const listAssistantController = async (req, res) => {
|
|
92
92
|
try {
|
|
93
|
-
const
|
|
93
|
+
const nodeEnv = process.env.NODE_ENV;
|
|
94
|
+
const airtableStatus = nodeEnv === 'production' ? 'prod' :
|
|
95
|
+
nodeEnv === 'development' ? 'dev' : nodeEnv;
|
|
96
|
+
const assistants = await getRecordByFilter(Config_ID, 'assistants', `status="${airtableStatus}"`);
|
|
94
97
|
return res.status(200).send({ message: 'List assistants' , assistants});
|
|
95
98
|
} catch (error) {
|
|
96
99
|
console.log(error);
|