import express from 'express';
import { wrapAsync } from '@/api/http/request';
import * as campusAttendance from '@/api/controllers/campus_attendance.controller';

const router = express.Router();

router.get('/configs', wrapAsync(campusAttendance.listConfigs));
router.put('/configs/:campusKey', wrapAsync(campusAttendance.upsertConfig));
router.get('/summaries', wrapAsync(campusAttendance.listSummaries));
router.put(
  '/summaries/:campusKey/:date',
  wrapAsync(campusAttendance.upsertSummary),
);

export default router;
