🚧 wip: add ip is column filter

This commit is contained in:
Fred KISSIE
2026-08-20 23:59:31 +02:00
parent 52c078a489
commit 65e4fe91b9
4 changed files with 56 additions and 13 deletions
@@ -82,7 +82,7 @@ export const queryAccessAuditLogsQuery = z.strictObject({
.default("0")
.transform(Number)
.pipe(z.int().nonnegative()),
ips: z
ip: z
.preprocess((val) => {
if (val === undefined || val === null || val === "") {
return undefined;
@@ -146,7 +146,8 @@ function getWhere(data: Q) {
data.path ? eq(requestAuditLog.path, data.path) : undefined,
data.action !== undefined
? eq(requestAuditLog.action, data.action)
: undefined
: undefined,
data.ip ? inArray(requestAuditLog.ip, data.ip) : undefined
);
}