12345678910111213141516171819202122232425262728 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- // 点赞
- router.post('/api/media/praise/create', controller.praise.create);
- router.post('/api/media/praise/update', controller.praise.update);
- router.delete('/api/media/praise/delete/:id', controller.praise.delete);
- router.get('/api/media/praise/query', controller.praise.query);
- // 收藏
- router.post('/api/media/collect/create', controller.collect.create);
- router.post('/api/media/collect/update', controller.collect.update);
- router.delete('/api/media/collect/delete/:id', controller.collect.delete);
- router.get('/api/media/collect/query', controller.collect.query);
- // 评论
- router.post('/api/media/discuss/create', controller.discuss.create);
- router.post('/api/media/discuss/update', controller.discuss.update);
- router.delete('/api/media/discuss/delete/:id', controller.discuss.delete);
- router.get('/api/media/discuss/query', controller.discuss.query);
- // 留言
- router.post('/api/media/leave/create', controller.leave.create);
- router.post('/api/media/leave/update', controller.leave.update);
- router.delete('/api/media/leave/delete/:id', controller.leave.delete);
- router.get('/api/media/leave/query', controller.leave.query);
- };
|