mark localServerUrl and apiUrl as deprecated

in `utils.ts`
This commit is contained in:
flx-sta 2024-11-04 12:48:24 -08:00
parent ea841574af
commit dbda14666e

View File

@ -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;