fix
parent
8208566ebb
commit
3f120add64
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue