feat: work
This commit is contained in:
parent
4f1a2ce105
commit
3b8d3aa7f9
|
@ -1,6 +1,6 @@
|
|||
const DiscordApi = {
|
||||
getUser: async () => {
|
||||
if (typeof localStorage.getItem('token') === undefined)
|
||||
if (typeof localStorage.getItem('token') !== "string")
|
||||
return null;
|
||||
|
||||
const req = await fetch('https://discord.com/api/v10/users/@me', {
|
||||
|
@ -14,7 +14,7 @@ const DiscordApi = {
|
|||
return await req.json();
|
||||
},
|
||||
refreshToken: () => {
|
||||
if (typeof localStorage.getItem('refresh') === undefined)
|
||||
if (typeof localStorage.getItem('refresh') !== "string")
|
||||
return null;
|
||||
|
||||
fetch('https://crss-api.theclashfruit.workers.dev/refresh', {
|
||||
|
|
Loading…
Reference in a new issue