From cde10ab9d2bf5a1d34efc776aa0aadbb68c3e937 Mon Sep 17 00:00:00 2001 From: Chatter Chats <57570001+chatterchats@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:07:01 -0700 Subject: [PATCH] Update getApiData.ts Future compatibility implementation IAW helldivers2.dev [#94](https://github.com/helldivers-2/api/issues/94) and diverharder.com [#7](https://github.com/helldivers-2/diveharder_api.py/issues/7) --- src/components/widgets/util/getApiData.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/widgets/util/getApiData.ts b/src/components/widgets/util/getApiData.ts index d7982f7..0872137 100644 --- a/src/components/widgets/util/getApiData.ts +++ b/src/components/widgets/util/getApiData.ts @@ -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 } }); @@ -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 } });