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({
|
const user = await Users.findOneBy({
|
||||||
id: userId,
|
id: userId,
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
isSuspended: !includeSuspended,
|
...(includeSuspended ? {} : {isSuspended: false}),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
@ -51,7 +51,7 @@ export async function getRemoteUser(userId: User['id'], includeSuspended = false
|
||||||
id: userId,
|
id: userId,
|
||||||
host: Not(IsNull()),
|
host: Not(IsNull()),
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
isSuspended: !includedSuspended,
|
...(includeSuspended ? {} : {isSuspended: false}),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
@ -69,7 +69,7 @@ export async function getLocalUser(userId: User['id'], includeSuspended = false)
|
||||||
id: userId,
|
id: userId,
|
||||||
host: IsNull(),
|
host: IsNull(),
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
isSuspended: !includeSuspended,
|
...(includeSuspended ? {} : {isSuspended: false}),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
|
Loading…
Reference in a new issue