From 4862a0ac33f080d9fca2c0c7430ec7393b952d7c Mon Sep 17 00:00:00 2001 From: valurefugl <65780958+valurefugl@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:32:28 +0100 Subject: [PATCH] fix(libs+sessions): Add 202 response code handling to document decorator. (#15187) Co-authored-by: Valur Einarsson Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- libs/nest/swagger/src/lib/documentation.decorator.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/nest/swagger/src/lib/documentation.decorator.ts b/libs/nest/swagger/src/lib/documentation.decorator.ts index ad61294f117b..0bf491d76ad3 100644 --- a/libs/nest/swagger/src/lib/documentation.decorator.ts +++ b/libs/nest/swagger/src/lib/documentation.decorator.ts @@ -1,5 +1,6 @@ import { applyDecorators, HttpCode } from '@nestjs/common' import { + ApiAcceptedResponse, ApiBadRequestResponse, ApiConflictResponse, ApiCreatedResponse, @@ -58,6 +59,8 @@ const getResponseDecorators = ({ ApiCreatedResponse(response), ApiConflictResponse({ type: HttpProblemResponse }), ] + case 202: + return [ApiAcceptedResponse(response)] case 204: return [ApiNoContentResponse(response)] default: