import express from "express";
import { WebTypeStandardController } from "../controllers/webTypeStandardController";
import { authenticateToken } from "../middleware/authMiddleware";

const router = express.Router();

// 모든 라우트에 인증 미들웨어 적용
router.use(authenticateToken);

// 웹타입 표준 관리 라우트
router.get("/", WebTypeStandardController.getWebTypes);
router.get("/categories", WebTypeStandardController.getWebTypeCategories);
router.get("/:webType", WebTypeStandardController.getWebType);
router.post("/", WebTypeStandardController.createWebType);
router.put("/:webType", WebTypeStandardController.updateWebType);
router.delete("/:webType", WebTypeStandardController.deleteWebType);
router.put(
  "/sort-order/bulk",
  WebTypeStandardController.updateWebTypeSortOrder
);

export default router;


