增加健康档案api
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Router from "koa-router";
|
||||
import { HandlerEscortRecord } from "../handler/escort_record.js";
|
||||
import { HandlerHealthProfile } from "../handler/health_profile.js";
|
||||
import { HandlerResource } from "../handler/resource.js";
|
||||
|
||||
function printRoutes(stack) {
|
||||
@@ -15,6 +16,7 @@ function registerRoutes(app) {
|
||||
const router = new Router({ prefix: '/health' });
|
||||
|
||||
const handlerEscortRecord = new HandlerEscortRecord();
|
||||
const handlerHealthProfile = new HandlerHealthProfile();
|
||||
const handlerResource = new HandlerResource();
|
||||
|
||||
router.get("/escort-record/my", handlerEscortRecord.getRecords.bind(handlerEscortRecord));
|
||||
@@ -25,6 +27,12 @@ function registerRoutes(app) {
|
||||
router.patch("/escort-record/:id/status", handlerEscortRecord.updateStatus.bind(handlerEscortRecord));
|
||||
router.delete("/escort-record/:id", handlerEscortRecord.deleteRecord.bind(handlerEscortRecord));
|
||||
|
||||
router.get("/health-profile", handlerHealthProfile.getProfiles.bind(handlerHealthProfile));
|
||||
router.get("/health-profile/:id", handlerHealthProfile.getProfileById.bind(handlerHealthProfile));
|
||||
router.post("/health-profile", handlerHealthProfile.createProfile.bind(handlerHealthProfile));
|
||||
router.put("/health-profile/:id", handlerHealthProfile.updateProfile.bind(handlerHealthProfile));
|
||||
router.delete("/health-profile/:id", handlerHealthProfile.deleteProfile.bind(handlerHealthProfile));
|
||||
|
||||
router.get("/service", handlerResource.getServices.bind(handlerResource));
|
||||
router.get("/agreement", handlerResource.getAgreement.bind(handlerResource));
|
||||
router.get("/hospital-info", handlerResource.getHospitalInfo.bind(handlerResource));
|
||||
|
||||
Reference in New Issue
Block a user