54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
/**
|
|
* 상호 배제 (Mutual Exclusion) 라우트
|
|
*/
|
|
|
|
import express from "express";
|
|
import {
|
|
getExclusions,
|
|
getExclusionDetail,
|
|
createExclusion,
|
|
updateExclusion,
|
|
deleteExclusion,
|
|
validateExclusion,
|
|
getExcludedOptions,
|
|
} from "../controllers/cascadingMutualExclusionController";
|
|
import { authenticateToken } from "../middleware/authMiddleware";
|
|
|
|
const router = express.Router();
|
|
|
|
// 인증 미들웨어 적용
|
|
router.use(authenticateToken);
|
|
|
|
// =====================================================
|
|
// 상호 배제 규칙 관리 API
|
|
// =====================================================
|
|
|
|
// 규칙 목록 조회
|
|
router.get("/", getExclusions);
|
|
|
|
// 규칙 상세 조회
|
|
router.get("/:exclusionId", getExclusionDetail);
|
|
|
|
// 규칙 생성
|
|
router.post("/", createExclusion);
|
|
|
|
// 규칙 수정
|
|
router.put("/:exclusionId", updateExclusion);
|
|
|
|
// 규칙 삭제
|
|
router.delete("/:exclusionId", deleteExclusion);
|
|
|
|
// =====================================================
|
|
// 상호 배제 검증 및 옵션 API (실제 사용)
|
|
// =====================================================
|
|
|
|
// 상호 배제 검증
|
|
router.post("/validate/:exclusionCode", validateExclusion);
|
|
|
|
// 배제된 옵션 조회
|
|
router.get("/options/:exclusionCode", getExcludedOptions);
|
|
|
|
export default router;
|
|
|
|
|