Skip to content

Commit

Permalink
Merge pull request #869 from dsebastien/master
Browse files Browse the repository at this point in the history
feat(): add shorthand decorator for precondition failed
  • Loading branch information
kamilmysliwiec committed Aug 20, 2020
2 parents 1f961d7 + 0a5f389 commit e224875
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/decorators/api-response.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ export const ApiNotImplementedResponse = (options: ApiResponseOptions = {}) =>
status: HttpStatus.NOT_IMPLEMENTED
});

export const ApiPreconditionFailedResponse = (
options: ApiResponseOptions = {}
) =>
ApiResponse({
...options,
status: HttpStatus.PRECONDITION_FAILED
});

export const ApiPayloadTooLargeResponse = (options: ApiResponseOptions = {}) =>
ApiResponse({
...options,
Expand Down

0 comments on commit e224875

Please sign in to comment.