fix: limits no longer cache during session changes

This commit is contained in:
Mythie
2023-10-22 11:18:00 +11:00
parent 2f2079e020
commit 1d604fff2c
3 changed files with 11 additions and 14 deletions

View File

@ -16,13 +16,10 @@ export const getLimits = async ({ headers }: GetLimitsOptions = {}) => {
headers: {
...requestHeaders,
},
next: {
revalidate: 60,
},
})
.then(async (res) => res.json())
.then((res) => ZLimitsResponseSchema.parse(res))
.catch(() => {
.catch((_err) => {
return {
quota: FREE_PLAN_LIMITS,
remaining: FREE_PLAN_LIMITS,