diff --git a/api/services/medications/index.js b/api/services/medications/index.js index bc35ee0..0a25731 100644 --- a/api/services/medications/index.js +++ b/api/services/medications/index.js @@ -1,6 +1,6 @@ import express from 'express'; import { databaseServices } from '../index.js'; -import { fullMedicationInformationSchema } from '../validations/medications.js'; +import { baseMedicationInformationSchema, fullMedicationInformationSchema } from '../validations/medications.js'; export const medicationRouter = express.Router(); @@ -22,7 +22,7 @@ medicationRouter.post('/base/', async (req, res) => { const body = req?.body; try { - await fullMedicationInformationSchema.validate(body); + await baseMedicationInformationSchema.validate(body); data = await databaseServices.getBaseMedications(body); res.status(200); } catch (err) {