add next revalidation to data endpoints
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user