From ecb13690a34f05858eecd001025e59806424c871 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 25 Jan 2026 16:26:59 -0700 Subject: [PATCH] Move to using const for this --- Assets/Scripts/Other/Endpoints.cs | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Assets/Scripts/Other/Endpoints.cs b/Assets/Scripts/Other/Endpoints.cs index f95521a..13d400d 100644 --- a/Assets/Scripts/Other/Endpoints.cs +++ b/Assets/Scripts/Other/Endpoints.cs @@ -1,28 +1,28 @@ public class Endpoints { - private static readonly string HOST = "games.lncvrt.xyz"; - public static readonly string BASE_URL = $"https://{HOST}/api"; - public static readonly string BERRYDASH_ENDPOINT = BASE_URL + "/berrydash"; - public static readonly string WS_ENDPOINT = $"wss://{HOST}/api/ws"; - public static readonly string CAN_LOAD_CLIENT_ENDPOINT = BASE_URL + "/can-load-client"; - public static readonly string LATEST_VERSION_ENDPOINT = BERRYDASH_ENDPOINT + "/latest-version"; - public static readonly string LEADERBOARDS_ENDPOINT = BERRYDASH_ENDPOINT + "/leaderboards"; - public static readonly string LEADERBOARDS_SCORE_ENDPOINT = LEADERBOARDS_ENDPOINT + "/score"; - public static readonly string LEADERBOARDS_BERRY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/berry"; - public static readonly string LEADERBOARDS_COIN_ENDPOINT = LEADERBOARDS_ENDPOINT + "/coin"; - public static readonly string LEADERBOARDS_LEGACY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/legacy"; - public static readonly string LEADERBOARDS_TOTAL_ENDPOINT = LEADERBOARDS_ENDPOINT + "/total"; - public static readonly string PROFILE_ENDPOINT = BERRYDASH_ENDPOINT + "/profile"; - public static readonly string PROFILE_POSTS_ENDPOINT = PROFILE_ENDPOINT + "/posts"; - public static readonly string ICON_MARKETPLACE_ENDPOINT = BERRYDASH_ENDPOINT + "/icon-marketplace"; - public static readonly string ICON_MARKETPLACE_UPLOAD_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/upload"; - public static readonly string ICON_MARKETPLACE_ICON_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/icon"; - public static readonly string ACCOUNT_ENDPOINT = BERRYDASH_ENDPOINT + "/account"; - public static readonly string ACCOUNT_LOGIN_ENDPOINT = ACCOUNT_ENDPOINT + "/login"; - public static readonly string ACCOUNT_REGISTER_ENDPOINT = ACCOUNT_ENDPOINT + "/register"; - public static readonly string ACCOUNT_SAVE_ENDPOINT = ACCOUNT_ENDPOINT + "/save"; - public static readonly string ACCOUNT_CHANGE_USERNAME_ENDPOINT = ACCOUNT_ENDPOINT + "/change-username"; - public static readonly string ACCOUNT_CHANGE_PASSWORD_ENDPOINT = ACCOUNT_ENDPOINT + "/change-password"; - public static readonly string ACCOUNT_FORGOT_USERNAME_ENDPOINT = BASE_URL + "/account/forgot-username"; - public static readonly string ACCOUNT_FORGOT_PASSWORD_ENDPOINT = BASE_URL + "/account/forgot-password"; + private const string HOST = "games.lncvrt.xyz"; + public const string BASE_URL = "https://" + HOST + "/api"; + public const string BERRYDASH_ENDPOINT = BASE_URL + "/berrydash"; + public const string WS_ENDPOINT = "wss://" + HOST + "/api/ws"; + public const string CAN_LOAD_CLIENT_ENDPOINT = BASE_URL + "/can-load-client"; + public const string LATEST_VERSION_ENDPOINT = BERRYDASH_ENDPOINT + "/latest-version"; + public const string LEADERBOARDS_ENDPOINT = BERRYDASH_ENDPOINT + "/leaderboards"; + public const string LEADERBOARDS_SCORE_ENDPOINT = LEADERBOARDS_ENDPOINT + "/score"; + public const string LEADERBOARDS_BERRY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/berry"; + public const string LEADERBOARDS_COIN_ENDPOINT = LEADERBOARDS_ENDPOINT + "/coin"; + public const string LEADERBOARDS_LEGACY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/legacy"; + public const string LEADERBOARDS_TOTAL_ENDPOINT = LEADERBOARDS_ENDPOINT + "/total"; + public const string PROFILE_ENDPOINT = BERRYDASH_ENDPOINT + "/profile"; + public const string PROFILE_POSTS_ENDPOINT = PROFILE_ENDPOINT + "/posts"; + public const string ICON_MARKETPLACE_ENDPOINT = BERRYDASH_ENDPOINT + "/icon-marketplace"; + public const string ICON_MARKETPLACE_UPLOAD_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/upload"; + public const string ICON_MARKETPLACE_ICON_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/icon"; + public const string ACCOUNT_ENDPOINT = BERRYDASH_ENDPOINT + "/account"; + public const string ACCOUNT_LOGIN_ENDPOINT = ACCOUNT_ENDPOINT + "/login"; + public const string ACCOUNT_REGISTER_ENDPOINT = ACCOUNT_ENDPOINT + "/register"; + public const string ACCOUNT_SAVE_ENDPOINT = ACCOUNT_ENDPOINT + "/save"; + public const string ACCOUNT_CHANGE_USERNAME_ENDPOINT = ACCOUNT_ENDPOINT + "/change-username"; + public const string ACCOUNT_CHANGE_PASSWORD_ENDPOINT = ACCOUNT_ENDPOINT + "/change-password"; + public const string ACCOUNT_FORGOT_USERNAME_ENDPOINT = BASE_URL + "/account/forgot-username"; + public const string ACCOUNT_FORGOT_PASSWORD_ENDPOINT = BASE_URL + "/account/forgot-password"; } \ No newline at end of file