From 093facc205a9895250598d626a56949f3723f41c Mon Sep 17 00:00:00 2001 From: "diegoargottez@gmail.com" Date: Mon, 15 Jan 2024 13:13:09 -0400 Subject: [PATCH] [imp]:audith on signin --- .../infrastructure/controllers/users.controller.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/users/infrastructure/controllers/users.controller.ts b/src/users/infrastructure/controllers/users.controller.ts index 79d35c0..de45044 100644 --- a/src/users/infrastructure/controllers/users.controller.ts +++ b/src/users/infrastructure/controllers/users.controller.ts @@ -236,7 +236,16 @@ export class UsersController { @ApiTags('Users') @Post('/auth/log-in') async signin(@Body() body: CreateUserDto) { - const data = await this.signUserIn.execute(body.phone); + + const service = new AudithApplicationServiceDecorator( + new LoggingApplicationServiceDecorator( + new SignUserIn(this.findByPhoneUserService), + new NestLogger(), + ), + this.audithRepo, + this.jwtService.decode(body.token).id, + ); + const data = await service.execute(body.phone); if (!data.IsSuccess) { return {