mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: return empty resp if user not exists in login preflight (#5588)
This commit is contained in:
@@ -112,6 +112,9 @@ export class UserResolver {
|
|||||||
const user = await this.users.findUserByEmail(email);
|
const user = await this.users.findUserByEmail(email);
|
||||||
if (currentUser) return user;
|
if (currentUser) return user;
|
||||||
|
|
||||||
|
// return empty response when user not exists
|
||||||
|
if (!user) return null;
|
||||||
|
|
||||||
// only return limited info when not logged in
|
// only return limited info when not logged in
|
||||||
return {
|
return {
|
||||||
email: user?.email,
|
email: user?.email,
|
||||||
|
|||||||
Reference in New Issue
Block a user