Skip to content

Commit

Permalink
fix: remove no-store cache if config is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed Jun 22, 2024
1 parent 84dd611 commit 10d40be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions services/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const config = {
headers: {
'Content-type': 'application/json',
},
next: {
revalidate: 0,
},
},
};

Expand Down
2 changes: 1 addition & 1 deletion services/api/fetchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function fetchRequest<TResponse>({
? (params as FormData)
: JSON.stringify(params)
: undefined,
cache: 'no-store',
...(myConfig ? {} : { cache: 'no-store' }),
...config.config,
...myConfig,
headers: {
Expand Down

0 comments on commit 10d40be

Please sign in to comment.