Skip to content

Commit

Permalink
feat(#114): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
witash committed Jun 24, 2024
1 parent 88f1014 commit 7a5243c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions mediator/src/routes/cht.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Router } from 'express';
import { requestHandler } from '../utils/request';
import { createPatient, updatePatientIds, createEncounter } from '../controllers/cht'
import { syncPatients, syncEncounters } from '../utils/openmrs_sync'

const router = Router();

Expand All @@ -22,17 +21,4 @@ router.post(
requestHandler((req) => createEncounter(req.body))
);

router.post(
'/sync',
requestHandler(async (req) => {
async function syncAll() {
await syncPatients();
await syncEncounters();
}
// dont await, return immediately
syncAll();
return { status: 200, data: {}};
})
);

export default router;

0 comments on commit 7a5243c

Please sign in to comment.