'use strict'; /** * @param {Egg.Application} app - egg application */ module.exports = app => { const { router, controller, middleware } = app; // const jwtErr = middleware.jwtErr(app.config.jwt); router.post('/api/v1/auth', controller.users.login)//用户登录 router.post('/api/v1/adduser', controller.users.addUser)//增加用户、查用户列表 // router.post('/api/v1/updateuser', jwtErr , controller.users.updateUser)//修改用户 // router.post('/api/v1/deluser', jwtErr , controller.users.delUser)//删除用户 router.post('/api/v1/getUserList', controller.users.getUserList) router.post('/api/v1/getUserLoginList', controller.users.getUserLoginList)//查找用户登陆列表 router.post('/api/v1/startSend', controller.home.startSend)//启动定时任务 router.post('/api/v1/startSendOnce', controller.home.startSendOnce)//初始化发送一次查询命令 router.get('/api/v1/endSend', controller.home.endSend)//关闭定时任务 };