更新完善页面

This commit is contained in:
董海洋
2026-06-03 14:15:55 +08:00
parent 4b7ae9c933
commit 1675662537
57 changed files with 7625 additions and 883 deletions
+5 -4
View File
@@ -1,13 +1,14 @@
const Router = require('koa-router')
const pointsGoodsController = require('../controllers/points-goods')
const { requireAuth, requireStaffAuth, requireAdminAuth } = require('../middleware/auth')
const router = new Router()
router.get('/', pointsGoodsController.getPointsGoods)
router.get('/:id', pointsGoodsController.getPointsGoodsById)
router.post('/', pointsGoodsController.createPointsGoods)
router.post('/exchange', pointsGoodsController.exchangePointsGoods)
router.put('/:id', pointsGoodsController.updatePointsGoods)
router.delete('/:id', pointsGoodsController.deletePointsGoods)
router.post('/', requireAdminAuth(), pointsGoodsController.createPointsGoods)
router.put('/:id', requireAdminAuth(), pointsGoodsController.updatePointsGoods)
router.delete('/:id', requireAdminAuth(), pointsGoodsController.deletePointsGoods)
router.post('/exchange', requireAuth(), pointsGoodsController.exchangePointsGoods)
module.exports = router.routes()