fix including suspended users in getter
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
Johann150 2023-04-15 21:10:57 +02:00
parent 9a085e9d42
commit ba2b7ef43c
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -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) {