fix: more strict equality check
All checks were successful
backend-action / build-image (push) Successful in 27s
All checks were successful
backend-action / build-image (push) Successful in 27s
This commit is contained in:
@@ -128,10 +128,10 @@ async function getAllUserCount(
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
let conditions: SQL[] = [];
|
let conditions: SQL[] = [];
|
||||||
if (group) {
|
if (group !== undefined) {
|
||||||
conditions.push(eq(user.group, group));
|
conditions.push(eq(user.group, group));
|
||||||
}
|
}
|
||||||
if (zoneId) {
|
if (zoneId !== undefined) {
|
||||||
conditions.push(eq(user.zone, zoneId));
|
conditions.push(eq(user.zone, zoneId));
|
||||||
}
|
}
|
||||||
if (zoneIds.length > 0) {
|
if (zoneIds.length > 0) {
|
||||||
@@ -169,10 +169,10 @@ async function getAllUser(
|
|||||||
offset,
|
offset,
|
||||||
where: (user, { eq, and }) => {
|
where: (user, { eq, and }) => {
|
||||||
let conditions: SQL[] = [];
|
let conditions: SQL[] = [];
|
||||||
if (group) {
|
if (group !== undefined) {
|
||||||
conditions.push(eq(user.group, group));
|
conditions.push(eq(user.group, group));
|
||||||
}
|
}
|
||||||
if (zoneId) {
|
if (zoneId !== undefined) {
|
||||||
conditions.push(eq(user.zone, zoneId));
|
conditions.push(eq(user.zone, zoneId));
|
||||||
}
|
}
|
||||||
if (zoneIds.length > 0) {
|
if (zoneIds.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user