fix: get-session response null error
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user