diff --git a/src/controller/user.controller.ts b/src/controller/user.controller.ts index 805f6a5..662c253 100644 --- a/src/controller/user.controller.ts +++ b/src/controller/user.controller.ts @@ -12,11 +12,15 @@ export class UserController { @Inject() userService: UserService; + @Inject() + ctx; + @ApiOkResponse({ type: LoginRes, }) @Post('/login') async login(@Body() body) { + this.ctx.logger.info('ip:', this.ctx.ip, '; path:', this.ctx.path, '; user:', body?.username); try { const result = await this.userService.login(body); return successResponse(result, '登录成功');