Skip to content

Commit

Permalink
Chore: Sleep API request only if in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gabo71096 committed Aug 12, 2023
1 parent 5dacf86 commit b487c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/app/api/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const responseBody = (response: AxiosResponse) => response.data;

axios.interceptors.response.use(
async (res) => {
await sleep();
if (import.meta.env.MODE === "development") await sleep();
return res;
},
(error: AxiosError) => {
Expand Down

0 comments on commit b487c6f

Please sign in to comment.