Fix Errors

This commit is contained in:
Matt DiMeglio 2026-01-23 01:15:15 -05:00
parent b143ee05b6
commit 27e273fe70
2 changed files with 3 additions and 2 deletions

View file

@ -33,9 +33,10 @@ medicationRouter.get('/base/', async (req, res) => {
medicationRouter.post('/full/', async (req, res) => { medicationRouter.post('/full/', async (req, res) => {
let data; let data;
const body = req?.body; const body = req?.body;
try { try {
await fullMedicationInformationSchema.validate(body); await fullMedicationInformationSchema.validate(body);
data = await databaseServices.getFullMedicationInformation(JSON.parse(body)); data = await databaseServices.getFullMedicationInformation(body);
res.status(200); res.status(200);
} catch (err) { } catch (err) {
data = { Error: err?.message }; data = { Error: err?.message };

View file

@ -89,7 +89,7 @@ export const medicationHelpers = {
]); ]);
const fullMedicationInformation = { const fullMedicationInformation = {
...medInformation ...medInformation[0]
}; };
medRoutes?.forEach((row) => { medRoutes?.forEach((row) => {