ignore folder
This commit is contained in:
10
services/audit.ts
Normal file
10
services/audit.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { ApiResponse, AuditItem } from "@/types/api";
|
||||
import { apiClient } from "./api";
|
||||
|
||||
export async function getAudit(limit = 50): Promise<AuditItem[]> {
|
||||
const response = await apiClient.get<ApiResponse<AuditItem[]>>("/api/audit", {
|
||||
params: { limit }
|
||||
});
|
||||
if (!response.data.success) throw new Error(response.data.message);
|
||||
return response.data.data;
|
||||
}
|
||||
Reference in New Issue
Block a user