From 3f120add6498cd9e5b4c3f32faa5285af7223098 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Thu, 9 Dec 2021 21:35:31 -0500 Subject: [PATCH] fix --- src/util/CloudServices.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) 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) {