Skip to content

Commit e224875

Browse files
authoredAug 20, 2020
Merge pull request #869 from dsebastien/master
feat(): add shorthand decorator for precondition failed
2 parents 1f961d7 + 0a5f389 commit e224875

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎lib/decorators/api-response.decorator.ts

+8
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@ export const ApiNotImplementedResponse = (options: ApiResponseOptions = {}) =>
181181
status: HttpStatus.NOT_IMPLEMENTED
182182
});
183183

184+
export const ApiPreconditionFailedResponse = (
185+
options: ApiResponseOptions = {}
186+
) =>
187+
ApiResponse({
188+
...options,
189+
status: HttpStatus.PRECONDITION_FAILED
190+
});
191+
184192
export const ApiPayloadTooLargeResponse = (options: ApiResponseOptions = {}) =>
185193
ApiResponse({
186194
...options,

0 commit comments

Comments
 (0)
Please sign in to comment.