ShiftSync/api/services/operations/medications.js
Matt DiMeglio 6ef7d89de3
Feature/api paramyxrx (#25)
* Update .gitignore

* Finalize server and add endpoints for paramyx app

* Update server.js

* Add middleware

* fix error

* Update auth.js

* add logs

* log

* Remove Console Logs
2026-01-18 01:26:01 -05:00

27 lines
No EOL
653 B
JavaScript

import { paramyxRunQuery } from '../paramyxConnection.js';
import { medicationHelpers } from './helpers/medications.js'
const getMedications = async () => {
try {
const dataResp = await paramyxRunQuery('SELECT * FROM medications');
return dataResp;
} catch (err) {
console.log('GET MEDICATIONS ERROR: ', err);
throw err;
}
};
const getBaseMedications = async () => {
try {
const dataResp = medicationHelpers.getBaseMedications();
return dataResp;
} catch (err) {
console.log('GET BASE MEDICATIONS ERROR: ', err);
throw err;
}
}
export const medicationOperations = {
getMedications,
getBaseMedications
}