Browse Source

clean store onmount if forbidden access

master
nicolas-arnaud 2 years ago
parent
commit
03c4509792
  1. 6
      front/volume/src/Auth.ts

6
front/volume/src/Auth.ts

@ -20,10 +20,8 @@ export async function getUser() {
referrerPolicy: "no-referrer", referrerPolicy: "no-referrer",
}); });
let user = await res.json(); let user = await res.json();
if (user.username) { if (user.username) store.set(user);
console.log(user); else store.set(null);
store.set(user);
}
} }
export function login() { export function login() {

Loading…
Cancel
Save