Skip to content

Commit 8fa8ea9

Browse files
committed
Fix revalidate logic
1 parent aef93d1 commit 8fa8ea9

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/services/AchievementService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const AchievementService = (() => {
55
const getAchievements = async (): Promise<Achievement[] | null> => {
66
const resp = await fetch(`${achievementsEndpoint}`, {
77
next: {
8-
revalidate: 86400, // 1 day
8+
revalidate: 0, // 1 day
99
},
1010
});
1111
if (resp.ok) return (await resp.json()) as Achievement[];

src/services/CompanyService.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const CompanyService = (() => {
44
const getCompany = async (id: string): Promise<Company | null> => {
55
const resp = await fetch(`${companiesEndpoint}/${id}`, {
66
next: {
7-
revalidate: 86400, // 1 day
7+
revalidate: 0, // 1 day
88
},
99
});
1010
if (resp.ok) return (await resp.json()) as Company;
@@ -14,7 +14,7 @@ export const CompanyService = (() => {
1414
const getCompanies = async (): Promise<Company[] | null> => {
1515
const resp = await fetch(companiesEndpoint, {
1616
next: {
17-
revalidate: 86400, // 1 day
17+
revalidate: 0, // 1 day
1818
},
1919
});
2020
if (resp.ok) return (await resp.json()) as Company[];
@@ -31,7 +31,7 @@ export const CompanyService = (() => {
3131
Authorization: `Bearer ${cannonToken}`,
3232
},
3333
next: {
34-
revalidate: 86400, // 1 day
34+
revalidate: 0, // 1 day
3535
},
3636
});
3737
if (resp.ok) return (await resp.json()) as Connection[];

src/services/PrizeService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const PrizeService = (() => {
55
try {
66
const resp = await fetch(`${prizesEndpoint}`, {
77
next: {
8-
revalidate: 86400, // 1 day
8+
revalidate: 0, // 1 day
99
},
1010
});
1111
if (resp.ok) return (await resp.json()) as Prize[];

src/services/SessionService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const SessionService = (() => {
66
): Promise<SINFOSession | null> => {
77
const resp = await fetch(`${sessionsEndpoint}/${sessionId}`, {
88
next: {
9-
revalidate: 86400, // 1 day
9+
revalidate: 0, // 1 day
1010
},
1111
});
1212
if (resp.ok) return (await resp.json()) as SINFOSession;
@@ -16,7 +16,7 @@ export const SessionService = (() => {
1616
const getSessions = async (): Promise<SINFOSession[] | null> => {
1717
const resp = await fetch(sessionsEndpoint, {
1818
next: {
19-
revalidate: 86400, // 1 day
19+
revalidate: 0, // 1 day
2020
},
2121
});
2222
if (resp.ok) return (await resp.json()) as SINFOSession[];

src/services/SpeakerService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const SpeakerService = (() => {
44
const getSpeaker = async (id: string): Promise<Speaker | null> => {
55
const resp = await fetch(`${speakersEndpoint}/${id}`, {
66
next: {
7-
revalidate: 86400, // 1 day
7+
revalidate: 0, // 1 day
88
},
99
});
1010
if (resp.ok) return (await resp.json()) as Speaker;
@@ -14,7 +14,7 @@ export const SpeakerService = (() => {
1414
const getSpeakers = async (): Promise<Speaker[] | null> => {
1515
const resp = await fetch(speakersEndpoint, {
1616
next: {
17-
revalidate: 86400, // 1 day
17+
revalidate: 0, // 1 day
1818
},
1919
});
2020
if (resp.ok) {

src/services/UserService.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const UserService = (() => {
1313
Authorization: `Bearer ${cannonToken}`,
1414
},
1515
next: {
16-
revalidate: 86400, // 1 day
16+
revalidate: 0, // 1 day
1717
},
1818
});
1919
if (resp.ok) return (await resp.json()) as User;
@@ -30,7 +30,7 @@ export const UserService = (() => {
3030
Authorization: `Bearer ${cannonToken}`,
3131
},
3232
next: {
33-
revalidate: 86400, // 1 day
33+
revalidate: 0, // 1 day
3434
},
3535
});
3636
if (resp.ok) return (await resp.json()) as User[];
@@ -140,7 +140,7 @@ export const UserService = (() => {
140140
Authorization: `Bearer ${cannonToken}`,
141141
},
142142
next: {
143-
revalidate: 86400, // 1 day
143+
revalidate: 0, // 1 day
144144
tags: ["modified-cv"],
145145
},
146146
},
@@ -290,7 +290,7 @@ export const UserService = (() => {
290290
Authorization: `Bearer ${cannonToken}`,
291291
},
292292
next: {
293-
revalidate: 86400, // 1 day
293+
revalidate: 0, // 1 day
294294
tags: ["updated-connection"],
295295
},
296296
});

0 commit comments

Comments
 (0)