Skip to content

Commit

Permalink
Update getApiData.ts
Browse files Browse the repository at this point in the history
Future compatibility implementation IAW helldivers2.dev [#94](helldivers-2/api#94) and diverharder.com [#7](helldivers-2/diveharder_api.py#7)
  • Loading branch information
chatterchats committed Apr 30, 2024
1 parent 98e9068 commit cde10ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/widgets/util/getApiData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ export async function API() {
const res = await fetch("https://api.diveharder.com/v1/all", {
headers: {
"User-Agent": "Helldivers 2 Companion - helldiverscompanion.app",
"Accept-Language": "en-US"
"Accept-Language": "en-US",
"X-Super-Client": "Helldivers 2 Companion - helldiverscompanion.app",
"X-Super-Contact": "@.mixhi"
},
next: { revalidate: 300 }
});
Expand All @@ -13,7 +15,9 @@ export async function statusAPI(){
const res = await fetch("https://api.helldivers2.dev/api/v1/planets",{
headers: {
"User-Agent": "Helldivers 2 Companion - helldiverscompanion.app",
"Accept-Language": "en-US"
"Accept-Language": "en-US",
"X-Super-Client": "Helldivers 2 Companion - helldiverscompanion.app",
"X-Super-Contact": "@.mixhi"
},
next: { revalidate: 300 }
});
Expand Down

0 comments on commit cde10ab

Please sign in to comment.