feat: I hate promises

This commit is contained in:
TheClashFruit 2023-08-24 16:42:17 +02:00
parent 3b8d3aa7f9
commit 5f90882cc7
Signed by: TheClashFruit
GPG key ID: CF4A319B9A73290C

View file

@ -9,9 +9,11 @@ const DiscordApi = {
}
});
const res = await req.json();
DiscordApi.refreshToken();
return await req.json();
return res;
},
refreshToken: () => {
if (typeof localStorage.getItem('refresh') !== "string")