21 lines
664 B
JavaScript
21 lines
664 B
JavaScript
|
|
/**
|
||
|
|
* 投递记录路由
|
||
|
|
*/
|
||
|
|
|
||
|
|
const express = require('express');
|
||
|
|
const router = express.Router();
|
||
|
|
const applicationController = require('../controllers/applicationController');
|
||
|
|
const { verifyToken } = require('../../middleware/auth');
|
||
|
|
|
||
|
|
// 所有路由都需要认证
|
||
|
|
router.use(verifyToken);
|
||
|
|
|
||
|
|
// 投递记录相关路由
|
||
|
|
router.post('/', applicationController.createApplication);
|
||
|
|
router.get('/', applicationController.getApplications);
|
||
|
|
router.get('/statistics', applicationController.getStatistics);
|
||
|
|
router.get('/:id', applicationController.getApplicationDetail);
|
||
|
|
router.put('/:id/withdraw', applicationController.withdrawApplication);
|
||
|
|
|
||
|
|
module.exports = router;
|