feat: 초기 프로젝트 설정 및 룰.md 파일 추가
This commit is contained in:
26
api.hyungi.net/routes/workReportRoutes.js
Normal file
26
api.hyungi.net/routes/workReportRoutes.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const workReportController = require('../controllers/workReportController');
|
||||
|
||||
// CREATE
|
||||
router.post('/', workReportController.createWorkReport);
|
||||
|
||||
// READ BY DATE
|
||||
router.get('/date/:date', workReportController.getWorkReportsByDate);
|
||||
|
||||
// ✅ summary 라우트는 반드시 아래보다 위에 둬야 작동합니다
|
||||
router.get('/summary', workReportController.getSummary);
|
||||
|
||||
// READ IN RANGE
|
||||
router.get('/', workReportController.getWorkReportsInRange);
|
||||
|
||||
// READ ONE (항상 가장 마지막)
|
||||
router.get('/:id', workReportController.getWorkReportById);
|
||||
|
||||
// UPDATE
|
||||
router.put('/:id', workReportController.updateWorkReport);
|
||||
|
||||
// DELETE
|
||||
router.delete('/:id', workReportController.removeWorkReport);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user