feat: I hate promises
This commit is contained in:
parent
3b8d3aa7f9
commit
5f90882cc7
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue