From 8a1b929692ed2fa7a7642d72499ff834dfd3d622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=8F=91?= Date: Tue, 2 Sep 2025 11:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=92=E7=82=B9=E8=AE=B0=E5=BD=95=E7=99=BB?= =?UTF-8?q?=E9=99=86ip=E7=AD=89=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/user.controller.ts | 4 ++++ 1 file changed, 4 insertions(+) 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, '登录成功');