From 9d2668dad09b051b556fcb37780682a252ab5aec Mon Sep 17 00:00:00 2001 From: Vinayak Sarawagi Date: Sat, 5 Oct 2024 23:35:13 +0530 Subject: [PATCH 1/3] upgrade package version to 0.1.33 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3505428..9e23d20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@intentjs/core", - "version": "0.1.32", + "version": "0.1.33", "description": "Core module for Intent", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", From 3f479d56d8a49e87526fbbb53d3a9bb161ca68b6 Mon Sep 17 00:00:00 2001 From: Vinayak Sarawagi Date: Sat, 5 Oct 2024 23:36:03 +0530 Subject: [PATCH 2/3] fix request object bugs --- lib/exceptions/intentExceptionFilter.ts | 4 ++-- lib/validator/index.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/exceptions/intentExceptionFilter.ts b/lib/exceptions/intentExceptionFilter.ts index cbb36a3..9cf70d8 100644 --- a/lib/exceptions/intentExceptionFilter.ts +++ b/lib/exceptions/intentExceptionFilter.ts @@ -18,14 +18,14 @@ export abstract class IntentExceptionFilter extends BaseExceptionFilter { catch(exception: any, host: ArgumentsHost) { const ctx = host.switchToHttp(); - const request = ctx.getRequest(); + const request = ctx.getRequest() as Request; const response = ctx.getResponse(); this.reportToSentry(exception); Log().error('', exception); - return this.handleHttp(exception, request.intent.req(), response); + return this.handleHttp(exception, request, response); } reportToSentry(exception: any): void { diff --git a/lib/validator/index.ts b/lib/validator/index.ts index 3ab240a..f564f12 100644 --- a/lib/validator/index.ts +++ b/lib/validator/index.ts @@ -24,8 +24,7 @@ export const Dto = createParamDecorator( if (contextType === 'ws') { return ctx.switchToWs().getClient()._dto; } - const request = ctx.switchToHttp().getRequest(); - const intentRequest = request.intent.req() as Request; - return intentRequest.body(); + const request = ctx.switchToHttp().getRequest() as Request; + return request.dto(); }, ); From 44a14182f00dc110259ac805943c8197bc88057e Mon Sep 17 00:00:00 2001 From: Vinayak Sarawagi Date: Sun, 6 Oct 2024 18:02:25 +0530 Subject: [PATCH 3/3] upgrade package.json version to 0.1.34 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e23d20..9f2d988 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@intentjs/core", - "version": "0.1.33", + "version": "0.1.34", "description": "Core module for Intent", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts",