更新完善页面
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user