Skip to content

Commit 7783325

Browse files
author
adriasala124
committed
feat: empty body default to empty object
1 parent 56dad50 commit 7783325

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/http-server/src/HttpServerModule.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ export abstract class HttpServerModule<
271271
const contextValue = contextParameterConfig
272272
? contextParameterConfig.value
273273
: await httpServerModule.createContext({
274-
request,
275-
reflection: { controllerReflection, methodReflection }
274+
request,
275+
reflection: { controllerReflection, methodReflection }
276276
});
277277

278278
const interceptorsBag = httpServerModule.prepareInterceptorBag({
@@ -420,7 +420,7 @@ export abstract class HttpServerModule<
420420
}
421421

422422
if (parameterConfig.source === 'body') {
423-
acc.body = parameterConfig.value;
423+
acc.body = parameterConfig.value || {};
424424
}
425425

426426
if (parameterConfig.source === 'header') {

0 commit comments

Comments
 (0)