18 lines
696 B
TypeScript
18 lines
696 B
TypeScript
// Shared between the admin audit-trails list route and its CSV export
|
|
// resource route (raw Response bodies only pass through component-less routes).
|
|
import type { AdminAuditLogFilters } from "@hivegrid/db/logs.server";
|
|
|
|
export const CSV_EXPORT_TAKE = 500;
|
|
|
|
export function getAdminAuditLogFiltersFromUrl(urlSearchParams: URLSearchParams): AdminAuditLogFilters {
|
|
return {
|
|
q: urlSearchParams.get("q"),
|
|
action: urlSearchParams.get("action"),
|
|
url: urlSearchParams.get("url"),
|
|
tenantId: urlSearchParams.get("tenantId"),
|
|
userId: urlSearchParams.get("userId"),
|
|
createdAtFrom: urlSearchParams.get("createdAtFrom"),
|
|
createdAtTo: urlSearchParams.get("createdAtTo"),
|
|
};
|
|
}
|