Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
sansan88 committed Jul 7, 2024
1 parent f8c5f28 commit 64b55b4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions functions/src/graphql/swissvolley/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
const fetch = require("node-fetch");
// eslint-disable-next-line @typescript-eslint/no-var-requires
// const {convert} = require("html-to-text");
import * as functions from "firebase-functions";

export default {
SwissVolley: {
Expand Down Expand Up @@ -86,7 +87,7 @@ async function getTeam(teamId: string) {
const data = await fetch("https://api.volleyball.ch/indoor/teams/" + teamId, {
headers: {
"Accept": "application/json",
"authorization": "clicsoftGmbhMasterApiKey",
"authorization": functions.config().swissvolley.token,
},
});
const teamData = await data.json();
Expand All @@ -110,7 +111,7 @@ async function getTeams(clubId: string) {
const data = await fetch("https://api.volleyball.ch/indoor/teams?clubId=" + clubId, {
headers: {
"Accept": "application/json",
"authorization": "clicsoftGmbhMasterApiKey",
"authorization": functions.config().swissvolley.token,
},
});
const teamListData = await data.json();
Expand Down Expand Up @@ -139,14 +140,10 @@ function getClub(clubId: string) {
}

async function getClubs() {
/* headers: {
"Accept": "application/json",
"authorization": "HYT_qY$m3-53nmA-",
}, */
const data = await fetch("https://api.volleyball.ch/indoor/clubs", {
headers: {
"Accept": "application/json",
"authorization": "clicsoftGmbhMasterApiKey",
"authorization": functions.config().swissvolley.token,
},
});
const clubData = await data.json();
Expand All @@ -167,7 +164,7 @@ async function getGames(teamId: string) {
const data = await fetch("https://api.volleyball.ch/indoor/games?region=SVRNO&teamId=" + teamId + "&includeCup=1", {
headers: {
"Accept": "application/json",
"authorization": "clicsoftGmbhMasterApiKey",
"authorization": functions.config().swissvolley.token,
},
});
const gameData = await data.json();
Expand All @@ -191,7 +188,7 @@ async function getRankings(groupId: string) {
const data = await fetch("https://api.volleyball.ch/indoor/ranking/" + groupId, {
headers: {
"Accept": "application/json",
"authorization": "clicsoftGmbhMasterApiKey",
"authorization": functions.config().swissvolley.token,
},
});
const rankingData = await data.json();
Expand Down

0 comments on commit 64b55b4

Please sign in to comment.