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",
});
let user = await res.json();
if (user.username) {
console.log(user);
store.set(user);
}
if (user.username) store.set(user);
else store.set(null);
}
export function login() {

Loading…
Cancel
Save