mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Assign user to userStore
This commit is contained in:
parent
84375a582e
commit
7bf12cc552
2 changed files with 9 additions and 4 deletions
|
|
@ -42,9 +42,11 @@ export default function LoginForm() {
|
|||
});
|
||||
|
||||
if (ok) {
|
||||
setItem(AUTH_TOKEN, data.token);
|
||||
const { user, token } = data;
|
||||
|
||||
setUser(data.user);
|
||||
setItem(AUTH_TOKEN, token);
|
||||
|
||||
setUser(user);
|
||||
|
||||
await router.push('/');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue