Skip to content

Commit

Permalink
do not explicitly set the body as empty string so it behaves the same…
Browse files Browse the repository at this point in the history
… as koa and express
  • Loading branch information
kchobantonov committed Jan 5, 2025
1 parent 59918ba commit 04dd319
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class HapiTemplateService extends TemplateService<HapiApiHandlerParameter
return tsoaResponsed.value;
}

const response = data !== null && data !== undefined ? h.response(data).code(200) : h.response('').code(204);
const response = data !== null && data !== undefined ? h.response(data).code(200) : h.response().code(204);

Object.keys(headers).forEach((name: string) => {
response.header(name, headers[name]);
Expand Down

0 comments on commit 04dd319

Please sign in to comment.