From dbda14666ed223b4bf0510df937fdb88d548ef3a Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:48:24 -0800 Subject: [PATCH] mark `localServerUrl` and `apiUrl` as deprecated in `utils.ts` --- src/utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 1e226bf8c51..be0aec84ecd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -259,9 +259,16 @@ export const isLocal = ( /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/.test(window.location.hostname)) && window.location.port !== "") || window.location.hostname === ""; +/** + * @deprecated Refer to [pokerogue-api.ts](./plugins/api/pokerogue-api.ts) instead + */ export const localServerUrl = import.meta.env.VITE_SERVER_URL ?? `http://${window.location.hostname}:${window.location.port + 1}`; -// Set the server URL based on whether it's local or not +/** + * Set the server URL based on whether it's local or not + * + * @deprecated Refer to [pokerogue-api.ts](./plugins/api/pokerogue-api.ts) instead + */ export const apiUrl = localServerUrl ?? "https://api.pokerogue.net"; // used to disable api calls when isLocal is true and a server is not found export let isLocalServerConnected = true;