14 lines
534 B
JavaScript
14 lines
534 B
JavaScript
|
|
const Router = require('koa-router')
|
||
|
|
const pointsGoodsController = require('../controllers/points-goods')
|
||
|
|
|
||
|
|
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)
|
||
|
|
|
||
|
|
module.exports = router.routes()
|