feat(hospital): 新增医院基础信息接口与复旦排名
This commit is contained in:
@@ -5,6 +5,7 @@ import { HandlerResource } from "../handler/resource.js";
|
||||
import { HandlerEmployee } from "../handler/employee.js";
|
||||
import { HandlerAIMedia } from "../handler/ai_media.js";
|
||||
import { HandlerTrainingApplication } from "../handler/training_application.js";
|
||||
import { HandlerHospital } from "../handler/hospital.js";
|
||||
import ResponseUtil from "../utils/responseUtil.js";
|
||||
import { getUserByToken } from "../utils/user_service.js";
|
||||
import { isAdmin } from "../utils/permissions.js";
|
||||
@@ -79,6 +80,7 @@ function registerRoutes(app) {
|
||||
const handlerEmployee = new HandlerEmployee();
|
||||
const handlerAIMedia = new HandlerAIMedia();
|
||||
const handlerTrainingApplication = new HandlerTrainingApplication();
|
||||
const handlerHospital = new HandlerHospital();
|
||||
|
||||
// 敏感数据路由需要登录后访问
|
||||
router.get("/escort-record/my", requireAuth, handlerEscortRecord.getMyRecords.bind(handlerEscortRecord));
|
||||
@@ -112,6 +114,13 @@ function registerRoutes(app) {
|
||||
router.put("/health-profile/:id", requireAuth, requireAdmin, handlerHealthProfile.updateProfile.bind(handlerHealthProfile));
|
||||
router.delete("/health-profile/:id", requireAuth, requireAdmin, handlerHealthProfile.deleteProfile.bind(handlerHealthProfile));
|
||||
|
||||
// 医院基础信息:列表/详情公开,写接口仅管理员
|
||||
router.get("/hospital", handlerHospital.getHospitals.bind(handlerHospital));
|
||||
router.get("/hospital/:id", handlerHospital.getHospitalById.bind(handlerHospital));
|
||||
router.post("/hospital", requireAuth, requireAdmin, createLimit, handlerHospital.createHospital.bind(handlerHospital));
|
||||
router.put("/hospital/:id", requireAuth, requireAdmin, updateLimit, handlerHospital.updateHospital.bind(handlerHospital));
|
||||
router.delete("/hospital/:id", requireAuth, requireAdmin, deleteLimit, handlerHospital.deleteHospital.bind(handlerHospital));
|
||||
|
||||
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