Add region #32
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import { databaseServices } from '../index.js';
|
import { databaseServices } from '../index.js';
|
||||||
import { fullMedicationInformationSchema } from '../validations/medications.js';
|
import { baseMedicationInformationSchema, fullMedicationInformationSchema } from '../validations/medications.js';
|
||||||
|
|
||||||
export const medicationRouter = express.Router();
|
export const medicationRouter = express.Router();
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ medicationRouter.post('/base/', async (req, res) => {
|
||||||
const body = req?.body;
|
const body = req?.body;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fullMedicationInformationSchema.validate(body);
|
await baseMedicationInformationSchema.validate(body);
|
||||||
data = await databaseServices.getBaseMedications(body);
|
data = await databaseServices.getBaseMedications(body);
|
||||||
res.status(200);
|
res.status(200);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue