/**
 * Customer CS(고객 사후관리) 라우트
 */
import { Router } from "express";
import { authenticateToken } from "../middleware/authMiddleware";
import { CustomerCsController } from "../controllers/customerCsController";

const router = Router();

// 옵션/대시보드 라우트가 :objId 보다 먼저 와야 매칭 우선순위가 맞음
router.get("/dashboard", authenticateToken, CustomerCsController.dashboard);
router.get("/options/categories", authenticateToken, CustomerCsController.categoriesOptions);
router.get("/options/codes/:parentCodeId", authenticateToken, CustomerCsController.codeOptions);

router.get("/", authenticateToken, CustomerCsController.list);
router.get("/:objId", authenticateToken, CustomerCsController.detail);
router.post("/", authenticateToken, CustomerCsController.merge);
router.delete("/", authenticateToken, CustomerCsController.remove);

export default router;
