54 lines
1.2 KiB
TypeScript
54 lines
1.2 KiB
TypeScript
/**
|
|
* 조건부 연쇄 (Conditional Cascading) 라우트
|
|
*/
|
|
|
|
import express from "express";
|
|
import {
|
|
getConditions,
|
|
getConditionDetail,
|
|
createCondition,
|
|
updateCondition,
|
|
deleteCondition,
|
|
getFilteredOptions,
|
|
} from "../controllers/cascadingConditionController";
|
|
import { authenticateToken } from "../middleware/authMiddleware";
|
|
|
|
const router = express.Router();
|
|
|
|
// 인증 미들웨어 적용
|
|
router.use(authenticateToken);
|
|
|
|
// =====================================================
|
|
// 조건부 연쇄 규칙 관리 API
|
|
// =====================================================
|
|
|
|
// 규칙 목록 조회
|
|
router.get("/", getConditions);
|
|
|
|
// 규칙 상세 조회
|
|
router.get("/:conditionId", getConditionDetail);
|
|
|
|
// 규칙 생성
|
|
router.post("/", createCondition);
|
|
|
|
// 규칙 수정
|
|
router.put("/:conditionId", updateCondition);
|
|
|
|
// 규칙 삭제
|
|
router.delete("/:conditionId", deleteCondition);
|
|
|
|
// =====================================================
|
|
// 조건부 필터링 적용 API (실제 사용)
|
|
// =====================================================
|
|
|
|
// 조건에 따른 필터링된 옵션 조회
|
|
router.get("/filtered-options/:relationCode", getFilteredOptions);
|
|
|
|
export default router;
|
|
|
|
|
|
|
|
|
|
|
|
|