index.js 427 B

12345678910111213141516
  1. const router = require('koa-router')()
  2. const { loginRouter } = require('./login')
  3. const { userRouter } = require('./user')
  4. const { uploadRouter } = require('./upload')
  5. const { DepartmentController } = require('../controller')
  6. loginRouter(router)
  7. userRouter(router)
  8. uploadRouter(router)
  9. router.get('/department/list', async (ctx, next) => {
  10. await next()
  11. await DepartmentController.findAll(ctx)
  12. })
  13. module.exports = router