I guess I did something wrong

This commit is contained in:
ItzLightyHD 2022-06-14 13:36:59 +02:00
parent b1a1d971d9
commit 848af7be60
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ registerServiceWorker();
let isLoggedIn: boolean = false;
const loginButton = document.getElementById("login_button")!;
const discordUserData = localStorage.getItem("user");
const discordUserData = localStorage.getItem("apexie-discord-user");
const getData = async () => {
// Use the access token from the parameters of the URL
@ -51,7 +51,7 @@ const getData = async () => {
// Check if access token is valid
if (user.status === 200) {
// Save the user's data to localStorage
localStorage.setItem("user", JSON.stringify(user.data));
localStorage.setItem("apexie-discord-user", JSON.stringify(user.data));
// Redirect to the main page
window.location.href = "/";