forked from FoundKeyGang/FoundKey
fix including suspended users in getter
This commit is contained in:
parent
9a085e9d42
commit
ba2b7ef43c
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ export async function getUser(userId: User['id'], includeSuspended = false) {
|
|||
const user = await Users.findOneBy({
|
||||
id: userId,
|
||||
isDeleted: false,
|
||||
isSuspended: !includeSuspended,
|
||||
...(includeSuspended ? {} : {isSuspended: false}),
|
||||
});
|
||||
|
||||
if (user == null) {
|
||||
|
@ -51,7 +51,7 @@ export async function getRemoteUser(userId: User['id'], includeSuspended = false
|
|||
id: userId,
|
||||
host: Not(IsNull()),
|
||||
isDeleted: false,
|
||||
isSuspended: !includedSuspended,
|
||||
...(includeSuspended ? {} : {isSuspended: false}),
|
||||
});
|
||||
|
||||
if (user == null) {
|
||||
|
@ -69,7 +69,7 @@ export async function getLocalUser(userId: User['id'], includeSuspended = false)
|
|||
id: userId,
|
||||
host: IsNull(),
|
||||
isDeleted: false,
|
||||
isSuspended: !includeSuspended,
|
||||
...(includeSuspended ? {} : {isSuspended: false}),
|
||||
});
|
||||
|
||||
if (user == null) {
|
||||
|
|
Loading…
Reference in a new issue