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(); }, ); diff --git a/package.json b/package.json index 3505428..9f2d988 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@intentjs/core", - "version": "0.1.32", + "version": "0.1.34", "description": "Core module for Intent", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts",