123456789101112131415161718192021222324252627282930313233 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- router.get('/', controller.home.index);
- // 礼物表设置路由
- router.resources('present', '/api/live/present', controller.present); // index、create、show、destroy
- router.post('present', '/api/live/present/:id', controller.present.update);
- // 礼物表设置路由
- router.resources('presentrcord', '/api/live/presentrcord', controller.presentrcord); // index、create、show、destroy
- router.post('presentrcord', '/api/live/presentrcord/:id', controller.presentrcord.update);
- // 房间表设置路由
- router.resources('room', '/api/live/room', controller.room); // index、create、show、destroy
- router.post('room', '/api/live/room/:id', controller.room.update);
- // 房间表设置路由
- router.resources('roomchat', '/api/live/roomchat', controller.roomchat); // index、create、show、destroy
- router.post('roomchat', '/api/live/roomchat/:id', controller.roomchat.update);
- // 房间表设置路由
- router.resources('chat', '/api/live/chat', controller.chat); // index、create、show、destroy
- router.post('chat', '/api/live/chat/:id', controller.chat.update);
- };
|