From 9a085e9d422436265fbcbce1350e44e659dc372f Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 15 Apr 2023 20:27:42 +0200 Subject: [PATCH] fixup: add missing curly braces This is a fixup for commit b14f3e8cdc5f15e87660931d1effff10e7ec63fa. --- packages/backend/src/server/api/common/getters.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/common/getters.ts b/packages/backend/src/server/api/common/getters.ts index a34d8ac1c..b8788ddba 100644 --- a/packages/backend/src/server/api/common/getters.ts +++ b/packages/backend/src/server/api/common/getters.ts @@ -30,7 +30,7 @@ export async function getNote(noteId: Note['id'], me: { id: User['id'] } | null) * Get user for API processing */ export async function getUser(userId: User['id'], includeSuspended = false) { - const user = await Users.findOneBy( + const user = await Users.findOneBy({ id: userId, isDeleted: false, isSuspended: !includeSuspended, @@ -47,7 +47,7 @@ export async function getUser(userId: User['id'], includeSuspended = false) { * Get remote user for API processing */ export async function getRemoteUser(userId: User['id'], includeSuspended = false) { - const user = await Users.findOneBy( + const user = await Users.findOneBy({ id: userId, host: Not(IsNull()), isDeleted: false, @@ -65,7 +65,7 @@ export async function getRemoteUser(userId: User['id'], includeSuspended = false * Get local user for API processing */ export async function getLocalUser(userId: User['id'], includeSuspended = false) { - const user = await Users.findOneBy( + const user = await Users.findOneBy({ id: userId, host: IsNull(), isDeleted: false,