mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 14:29:28 +02:00
mark localServerUrl
and apiUrl
as deprecated
in `utils.ts`
This commit is contained in:
parent
ea841574af
commit
dbda14666e
@ -259,9 +259,16 @@ export const isLocal = (
|
|||||||
/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/.test(window.location.hostname)) &&
|
/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/.test(window.location.hostname)) &&
|
||||||
window.location.port !== "") || 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}`;
|
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";
|
export const apiUrl = localServerUrl ?? "https://api.pokerogue.net";
|
||||||
// used to disable api calls when isLocal is true and a server is not found
|
// used to disable api calls when isLocal is true and a server is not found
|
||||||
export let isLocalServerConnected = true;
|
export let isLocalServerConnected = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user