Skip to content

Commit

Permalink
Update actions.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Nov 21, 2024
1 parent 46f6be9 commit a9dc228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions next-canary/src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export async function randomColorTheme(tags: SyncTag[]) {
const res = await fetch('https://lcapi-examples-api.sanity.dev/api/random-color-theme', {
method: 'PUT',
})
// Wait 1 second to stagger requests a little bit
await new Promise((resolve) => setTimeout(resolve, 1_000))
expireTag(...tags)
return res.json()
}

0 comments on commit a9dc228

Please sign in to comment.