Skip to content

Commit

Permalink
Remove delay from json
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Jul 24, 2023
1 parent 603d7fc commit 446ccc5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions generator/client/msw-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,9 @@ export function generateMSWHandlers(spec: OpenAPIV3.Document) {
*/
export function json<B extends DefaultBodyType>(
body: B,
options: { status?: number; delay?: number } = {}
options: { status?: number } = {}
): StrictResponse<B> {
const { status = 200, delay = 0 } = options;
if (delay) {
doDelay(delay);
}
const { status = 200 } = options;
return HttpResponse.json(body, { status });
}
Expand Down

0 comments on commit 446ccc5

Please sign in to comment.