mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 14:43:06 +08:00
69d7532c6c
feat: clickhouse driver * sync * updates
23 lines
691 B
TypeScript
23 lines
691 B
TypeScript
import api from "@/lib/api-client";
|
|
import { IAuditLog, IAuditLogParams } from "@/ee/audit/types/audit.types";
|
|
import { IPagination } from "@/lib/types";
|
|
|
|
export async function getAuditLogs(
|
|
params?: IAuditLogParams,
|
|
): Promise<IPagination<IAuditLog>> {
|
|
const req = await api.post("/audit", { ...params });
|
|
return req.data;
|
|
}
|
|
|
|
export async function getAuditRetention(): Promise<{ retentionDays: number }> {
|
|
const req = await api.post("/audit/retention");
|
|
return req.data;
|
|
}
|
|
|
|
export async function updateAuditRetention(data: {
|
|
auditRetentionDays: number;
|
|
}): Promise<{ retentionDays: number }> {
|
|
const req = await api.post("/audit/retention/update", data);
|
|
return req.data;
|
|
}
|