add next revalidation to data endpoints

This commit is contained in:
2025-02-15 14:52:07 -05:00
parent 42d85db5e5
commit 216aa36cd7
6 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ import type { ContentTrackerItem } from '@/utils/types';
const fetchData = async () => {
const { data } = await fetch("https://api.alexav.gg/v4/tracker/latest/book", {
method: 'get'
method: 'get',
next: { revalidate: 60 }
}).then((res) => res.json())
return data
}
+2 -1
View File
@@ -3,7 +3,8 @@ import type { MedalClip } from '@/utils/types';
const fetchData = async () => {
const { data } = await fetch("https://api.alexav.gg/v4/social/medal", {
method: 'get'
method: 'get',
next: { revalidate: 60 }
}).then((res) => res.json())
return data[0]
}
+2 -1
View File
@@ -3,7 +3,8 @@ import type { GameData } from '@/utils/types';
const fetchData = async () => {
const { data } = await fetch("https://api.alexav.gg/v4/game", {
method: 'get'
method: 'get',
next: { revalidate: 60 }
}).then((res) => res.json())
return data
@@ -3,8 +3,10 @@ import type { MusicData } from '@/utils/types';
const fetchData = async () => {
const { data } = await fetch("https://api.alexav.gg/v4/social/music", {
method: 'get'
method: 'get',
next: { revalidate: 60 }
}).then((res) => res.json())
return data.tracks[0]
}
@@ -3,7 +3,8 @@ import type { WatchData } from '@/utils/types';
const fetchData = async () => {
const data = await fetch("https://api.alexav.gg/v4/tracker/latest/tv", {
method: 'get'
method: 'get',
next: { revalidate: 60 }
});
return await data.json()
}