const { UserController } = require('../controller')

module.exports.userRouter = function (router) {
  router.get('/user/find', async (ctx, next) => {
    await next()
    await UserController.find(ctx)
  })

  router.get('/user/preview', async (ctx, next) => {
    await next()
    await UserController.preview(ctx)
  })

  router.post('/user/create', async (ctx, next) => {
    await next()
    await UserController.create(ctx)
  })
}
