(ctx, next)
| 7 | |
| 8 | class UserController { |
| 9 | async create(ctx, next) { |
| 10 | // 获取用户请求传递的参数 |
| 11 | const user = ctx.request.body; |
| 12 | |
| 13 | // 查询数据 |
| 14 | const result = await userService.create(user); |
| 15 | |
| 16 | // 返回数据 |
| 17 | ctx.body = result; |
| 18 | } |
| 19 | |
| 20 | async avatarInfo(ctx, next) { |
| 21 | // 1.用户的头像是哪一个文件呢? |
nothing calls this directly
no outgoing calls
no test coverage detected