Skip to content

Commit

Permalink
fix(libs+sessions): Add 202 response code handling to document decora…
Browse files Browse the repository at this point in the history
…tor. (#15187)

Co-authored-by: Valur Einarsson <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored and sigruntg committed Jun 12, 2024
1 parent 0a90a03 commit a2f3479
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/nest/swagger/src/lib/documentation.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { applyDecorators, HttpCode } from '@nestjs/common'
import {
ApiAcceptedResponse,
ApiBadRequestResponse,
ApiConflictResponse,
ApiCreatedResponse,
Expand Down Expand Up @@ -58,6 +59,8 @@ const getResponseDecorators = ({
ApiCreatedResponse(response),
ApiConflictResponse({ type: HttpProblemResponse }),
]
case 202:
return [ApiAcceptedResponse(response)]
case 204:
return [ApiNoContentResponse(response)]
default:
Expand Down

0 comments on commit a2f3479

Please sign in to comment.