feat: 添加财务摘要接口,更新管理员抽奖模块和导航,优化权限管理逻辑
This commit is contained in:
30
src/api/admin-reports.ts
Normal file
30
src/api/admin-reports.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { adminRequest } from "@/lib/admin-http";
|
||||
|
||||
import { API_V1_PREFIX } from "./paths";
|
||||
|
||||
import type {
|
||||
AdminReportJobCreateResponse,
|
||||
AdminReportJobListData,
|
||||
} from "@/types/api/admin-reports";
|
||||
|
||||
const A = `${API_V1_PREFIX}/admin`;
|
||||
|
||||
export async function getAdminReportJobs(params?: {
|
||||
page?: number;
|
||||
per_page?: number;
|
||||
}): Promise<AdminReportJobListData> {
|
||||
return adminRequest.get<AdminReportJobListData>(`${A}/report-jobs`, {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
export async function postAdminReportJob(body: {
|
||||
report_type: string;
|
||||
export_format?: "csv" | "xlsx";
|
||||
filter_json?: Record<string, unknown> | null;
|
||||
}): Promise<AdminReportJobCreateResponse> {
|
||||
return adminRequest.post<AdminReportJobCreateResponse>(
|
||||
`${A}/report-jobs`,
|
||||
body,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user