From 2a307e8064060b85d538b6aec4a95b68ad375399 Mon Sep 17 00:00:00 2001 From: stevenhuyn <18359644+stevenhuyn@users.noreply.github.com> Date: Wed, 27 Dec 2023 00:07:27 -0800 Subject: [PATCH] Remove debug statements --- src/utility/Api.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/utility/Api.ts b/src/utility/Api.ts index 5440dc4..032c51d 100644 --- a/src/utility/Api.ts +++ b/src/utility/Api.ts @@ -1,14 +1,8 @@ import { Scenario } from "./Scenario"; -console.log(window.location.host); -console.log(window.location.host.includes("plakait")); - -const BACKEND_BASE_URL = - window.location.host.includes("plakait") - ? new URL("https://plakait-backend-production.up.railway.app/") - : new URL("http://localhost:8000/"); - -console.log("BACKEND_BASE_URL:", BACKEND_BASE_URL); +const BACKEND_BASE_URL = window.location.host.includes("plakait") + ? new URL("https://plakait-backend-production.up.railway.app/") + : new URL("http://localhost:8000/"); export type BotMessage = { type: "Bot"; @@ -54,7 +48,9 @@ interface PostGameResponse { gameId: string; messages: Message[]; } -export const PostGame = async (scenario: Scenario): Promise => { +export const PostGame = async ( + scenario: Scenario +): Promise => { const requestOptions = { method: "POST", headers: { "Content-Type": "application/json" }, @@ -67,7 +63,9 @@ export const PostGame = async (scenario: Scenario): Promise => if (response.ok) { return response.json() as Promise; } - throw Error("Failed to initiate game - Server returned a non 200 response"); + throw Error( + "Failed to initiate game - Server returned a non 200 response" + ); }) .catch(() => { throw Error("Post Game Exception"); @@ -86,7 +84,9 @@ export const GetHistory = async (game_id: string): Promise => { if (response.ok) { return response.json() as Promise; } - throw Error("Failed to Get game history - Server returned a non 200 response"); + throw Error( + "Failed to Get game history - Server returned a non 200 response" + ); }) .catch(() => { throw Error("Get History Exception");