mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-09-11 19:47:35 +03:00
fix: return empty resp if user not exists in login preflight (#5588)
This commit is contained in:
parent
5aea84af8f
commit
18907ebe57
@ -112,6 +112,9 @@ export class UserResolver {
|
||||
const user = await this.users.findUserByEmail(email);
|
||||
if (currentUser) return user;
|
||||
|
||||
// return empty response when user not exists
|
||||
if (!user) return null;
|
||||
|
||||
// only return limited info when not logged in
|
||||
return {
|
||||
email: user?.email,
|
||||
|
Loading…
Reference in New Issue
Block a user