diff --git a/src/app/backendAPI/backendAPI.ts b/src/app/backendAPI/backendAPI.ts index 5826a20..e89c831 100644 --- a/src/app/backendAPI/backendAPI.ts +++ b/src/app/backendAPI/backendAPI.ts @@ -1,4 +1,5 @@ import axios, { AxiosResponse } from "axios"; +import { fetchToken } from "./tokenFetch"; let accessToken = ""; const BASE_URL = "https://api.metacube.games:8080/"; diff --git a/src/app/backendAPI/tokenFetch.ts b/src/app/backendAPI/tokenFetch.ts index 4e80ec4..ea22bef 100644 --- a/src/app/backendAPI/tokenFetch.ts +++ b/src/app/backendAPI/tokenFetch.ts @@ -1,4 +1,4 @@ -async function fetchToken(reconnect: boolean) { +export async function fetchToken(reconnect: boolean) { const response = await fetch( `http://play.metacube.games/api/set-cookie?reconnect=${reconnect}`, {