mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 20:02:26 +00:00
Filtering on all tables
This commit is contained in:
@@ -46,6 +46,7 @@ export const queryAccessAuditLogsQuery = z.object({
|
||||
.pipe(z.number().int().positive())
|
||||
.optional(),
|
||||
actor: z.string().optional(),
|
||||
location: z.string().optional(),
|
||||
host: z.string().optional(),
|
||||
path: z.string().optional(),
|
||||
limit: z
|
||||
@@ -82,6 +83,7 @@ function getWhere(data: Q) {
|
||||
data.method ? eq(requestAuditLog.method, data.method) : undefined,
|
||||
data.reason ? eq(requestAuditLog.reason, data.reason) : undefined,
|
||||
data.host ? eq(requestAuditLog.host, data.host) : undefined,
|
||||
data.location ? eq(requestAuditLog.location, data.location) : undefined,
|
||||
data.path ? eq(requestAuditLog.path, data.path) : undefined,
|
||||
data.action !== undefined
|
||||
? eq(requestAuditLog.action, data.action)
|
||||
|
||||
@@ -13,6 +13,9 @@ export type QueryActionAuditLogResponse = {
|
||||
limit: number;
|
||||
offset: number;
|
||||
};
|
||||
filterAttributes: {
|
||||
actors: string[];
|
||||
};
|
||||
};
|
||||
|
||||
export type QueryRequestAuditLogResponse = {
|
||||
|
||||
Reference in New Issue
Block a user