mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix destructure error.
This commit is contained in:
parent
592c3fa6e6
commit
bba8876522
1 changed files with 2 additions and 5 deletions
|
|
@ -12,17 +12,14 @@ export default function useRequireLogin() {
|
|||
async function loadUser() {
|
||||
setLoading(true);
|
||||
|
||||
const {
|
||||
ok,
|
||||
data: { user },
|
||||
} = await get('/auth/verify');
|
||||
const { ok, data } = await get('/auth/verify');
|
||||
|
||||
if (!ok) {
|
||||
await router.push('/login');
|
||||
return null;
|
||||
}
|
||||
|
||||
setUser(user);
|
||||
setUser(data.user);
|
||||
|
||||
setLoading(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue