Move to using const for this

This commit is contained in:
2026-01-25 16:26:59 -07:00
parent 386a838b50
commit ecb13690a3

View File

@@ -1,28 +1,28 @@
public class Endpoints public class Endpoints
{ {
private static readonly string HOST = "games.lncvrt.xyz"; private const string HOST = "games.lncvrt.xyz";
public static readonly string BASE_URL = $"https://{HOST}/api"; public const string BASE_URL = "https://" + HOST + "/api";
public static readonly string BERRYDASH_ENDPOINT = BASE_URL + "/berrydash"; public const string BERRYDASH_ENDPOINT = BASE_URL + "/berrydash";
public static readonly string WS_ENDPOINT = $"wss://{HOST}/api/ws"; public const string WS_ENDPOINT = "wss://" + HOST + "/api/ws";
public static readonly string CAN_LOAD_CLIENT_ENDPOINT = BASE_URL + "/can-load-client"; public const string CAN_LOAD_CLIENT_ENDPOINT = BASE_URL + "/can-load-client";
public static readonly string LATEST_VERSION_ENDPOINT = BERRYDASH_ENDPOINT + "/latest-version"; public const string LATEST_VERSION_ENDPOINT = BERRYDASH_ENDPOINT + "/latest-version";
public static readonly string LEADERBOARDS_ENDPOINT = BERRYDASH_ENDPOINT + "/leaderboards"; public const string LEADERBOARDS_ENDPOINT = BERRYDASH_ENDPOINT + "/leaderboards";
public static readonly string LEADERBOARDS_SCORE_ENDPOINT = LEADERBOARDS_ENDPOINT + "/score"; public const string LEADERBOARDS_SCORE_ENDPOINT = LEADERBOARDS_ENDPOINT + "/score";
public static readonly string LEADERBOARDS_BERRY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/berry"; public const string LEADERBOARDS_BERRY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/berry";
public static readonly string LEADERBOARDS_COIN_ENDPOINT = LEADERBOARDS_ENDPOINT + "/coin"; public const string LEADERBOARDS_COIN_ENDPOINT = LEADERBOARDS_ENDPOINT + "/coin";
public static readonly string LEADERBOARDS_LEGACY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/legacy"; public const string LEADERBOARDS_LEGACY_ENDPOINT = LEADERBOARDS_ENDPOINT + "/legacy";
public static readonly string LEADERBOARDS_TOTAL_ENDPOINT = LEADERBOARDS_ENDPOINT + "/total"; public const string LEADERBOARDS_TOTAL_ENDPOINT = LEADERBOARDS_ENDPOINT + "/total";
public static readonly string PROFILE_ENDPOINT = BERRYDASH_ENDPOINT + "/profile"; public const string PROFILE_ENDPOINT = BERRYDASH_ENDPOINT + "/profile";
public static readonly string PROFILE_POSTS_ENDPOINT = PROFILE_ENDPOINT + "/posts"; public const string PROFILE_POSTS_ENDPOINT = PROFILE_ENDPOINT + "/posts";
public static readonly string ICON_MARKETPLACE_ENDPOINT = BERRYDASH_ENDPOINT + "/icon-marketplace"; public const string ICON_MARKETPLACE_ENDPOINT = BERRYDASH_ENDPOINT + "/icon-marketplace";
public static readonly string ICON_MARKETPLACE_UPLOAD_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/upload"; public const string ICON_MARKETPLACE_UPLOAD_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/upload";
public static readonly string ICON_MARKETPLACE_ICON_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/icon"; public const string ICON_MARKETPLACE_ICON_ENDPOINT = ICON_MARKETPLACE_ENDPOINT + "/icon";
public static readonly string ACCOUNT_ENDPOINT = BERRYDASH_ENDPOINT + "/account"; public const string ACCOUNT_ENDPOINT = BERRYDASH_ENDPOINT + "/account";
public static readonly string ACCOUNT_LOGIN_ENDPOINT = ACCOUNT_ENDPOINT + "/login"; public const string ACCOUNT_LOGIN_ENDPOINT = ACCOUNT_ENDPOINT + "/login";
public static readonly string ACCOUNT_REGISTER_ENDPOINT = ACCOUNT_ENDPOINT + "/register"; public const string ACCOUNT_REGISTER_ENDPOINT = ACCOUNT_ENDPOINT + "/register";
public static readonly string ACCOUNT_SAVE_ENDPOINT = ACCOUNT_ENDPOINT + "/save"; public const string ACCOUNT_SAVE_ENDPOINT = ACCOUNT_ENDPOINT + "/save";
public static readonly string ACCOUNT_CHANGE_USERNAME_ENDPOINT = ACCOUNT_ENDPOINT + "/change-username"; public const string ACCOUNT_CHANGE_USERNAME_ENDPOINT = ACCOUNT_ENDPOINT + "/change-username";
public static readonly string ACCOUNT_CHANGE_PASSWORD_ENDPOINT = ACCOUNT_ENDPOINT + "/change-password"; public const string ACCOUNT_CHANGE_PASSWORD_ENDPOINT = ACCOUNT_ENDPOINT + "/change-password";
public static readonly string ACCOUNT_FORGOT_USERNAME_ENDPOINT = BASE_URL + "/account/forgot-username"; public const string ACCOUNT_FORGOT_USERNAME_ENDPOINT = BASE_URL + "/account/forgot-username";
public static readonly string ACCOUNT_FORGOT_PASSWORD_ENDPOINT = BASE_URL + "/account/forgot-password"; public const string ACCOUNT_FORGOT_PASSWORD_ENDPOINT = BASE_URL + "/account/forgot-password";
} }