diff --git a/src/util/CloudServices.ts b/src/util/CloudServices.ts index 82c0844..cda3b6e 100644 --- a/src/util/CloudServices.ts +++ b/src/util/CloudServices.ts @@ -38,21 +38,8 @@ export default class CloudServicesUtil { } static async setTier(userID: string, tier: 1 | 2 | 3, authorization: string) { - let responseStatus: number; - switch (tier) { - case 1: - responseStatus = (await axios.get(`https://api.cloud.libraryofcode.org/wh/t2-rm?userID=${userID}&auth=${authorization}`)).status; - break; - case 2: - responseStatus = (await axios.get(`https://api.cloud.libraryofcode.org/wh/t2?userID=${userID}&auth=${authorization}`)).status; - break; - case 3: - responseStatus = (await axios.get(`https://api.cloud.libraryofcode.org/wh/t3?userID=${userID}&auth=${authorization}`)).status; - break; - default: - throw new RangeError('Invalid Tier.'); - } - return responseStatus; + const response = await axios.get(`https://api.cloud.libraryofcode.org/wh/set-tier?userID=${userID}&t=${tier}&auth=${authorization}`); + return response.status; } static async fetchAccountStatus(userID: string, authorization: string) {