Files
services/routes/points-goods.js
T

15 lines
699 B
JavaScript
Raw Normal View History

2026-05-26 09:18:48 +08:00
const Router = require('koa-router')
const pointsGoodsController = require('../controllers/points-goods')
2026-06-03 14:15:55 +08:00
const { requireAuth, requireStaffAuth, requireAdminAuth } = require('../middleware/auth')
2026-05-26 09:18:48 +08:00
const router = new Router()
router.get('/', pointsGoodsController.getPointsGoods)
router.get('/:id', pointsGoodsController.getPointsGoodsById)
2026-06-03 14:15:55 +08:00
router.post('/', requireAdminAuth(), pointsGoodsController.createPointsGoods)
router.put('/:id', requireAdminAuth(), pointsGoodsController.updatePointsGoods)
router.delete('/:id', requireAdminAuth(), pointsGoodsController.deletePointsGoods)
router.post('/exchange', requireAuth(), pointsGoodsController.exchangePointsGoods)
2026-05-26 09:18:48 +08:00
module.exports = router.routes()