import { Router } from "express";

import { periodsController } from "../controllers/periodsController.js";
import { asyncHandler } from "../utils/asyncHandler.js";

const router = Router();

router.get("/", asyncHandler(periodsController.list));
router.put("/:id/close", asyncHandler(periodsController.close));
router.put("/:id/reopen", asyncHandler(periodsController.reopen));

export default router;
