系统:停服维护逻辑

This commit is contained in:
luying
2021-07-15 14:40:26 +08:00
parent 352aecfb56
commit 0028c9b992
26 changed files with 348 additions and 50 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import { Application } from 'egg';
export default (app: Application) => {
const { controller, router } = app;
const tokenParser = app.middleware.tokenParser();
const checkMainten = app.middleware.checkMainten();
router.get('/dev', controller.home.dev);
router.get('/dev/smscode', controller.account.getSmsCode);
router.get('/', controller.home.index);
@@ -11,8 +12,8 @@ export default (app: Application) => {
router.post('/user/smslogin', controller.account.smsLogin);
router.post('/user/setpassword', tokenParser, controller.account.setPassword);
router.post('/user/pwlogin', controller.account.pwLogin);
router.post('/user/checkrole', tokenParser, controller.account.checkRole);
router.post('/user/createrole', tokenParser, controller.account.createRole);
router.post('/user/checkrole', tokenParser, checkMainten, controller.account.checkRole);
router.post('/user/createrole', tokenParser, checkMainten, controller.account.createRole);
router.post('/user/bind', tokenParser, controller.account.bind);
router.post('/user/authentication', tokenParser, controller.account.authentication);
router.post('/game/getserverlist', tokenParser, controller.game.getServerList);