Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/exceptions/intentExceptionFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export abstract class IntentExceptionFilter extends BaseExceptionFilter {

catch(exception: any, host: ArgumentsHost) {
const ctx = host.switchToHttp();
const request = ctx.getRequest<any>();
const request = ctx.getRequest<any>() as Request;
const response = ctx.getResponse<any>();

this.reportToSentry(exception);

Log().error('', exception);

return this.handleHttp(exception, request.intent.req(), response);
return this.handleHttp(exception, request, response);
}

reportToSentry(exception: any): void {
Expand Down
5 changes: 2 additions & 3 deletions lib/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down