fix: get-session response null error
This commit is contained in:
parent
23152d0222
commit
3bdcc90c70
|
|
@ -25,11 +25,15 @@ class UserSyncService {
|
|||
}>("/better-auth/get-session", {
|
||||
method: "GET",
|
||||
})
|
||||
immerSet((state) => {
|
||||
state.whoami = res.user
|
||||
})
|
||||
userActions.upsertMany([res.user])
|
||||
return res.user
|
||||
if (res) {
|
||||
immerSet((state) => {
|
||||
state.whoami = res.user
|
||||
})
|
||||
userActions.upsertMany([res.user])
|
||||
return res.user
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue