Add Oudelaa dashboard API integration
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
هذا الالتزام موجود في:
20
oudelaa_dashboard/lib/api/reports.ts
Normal file
20
oudelaa_dashboard/lib/api/reports.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { apiEndpoints } from "@/lib/api/endpoints";
|
||||
import { fetchWithAuth } from "@/lib/auth/client";
|
||||
import type { PlatformReport, ReportsResponse, ReportStatus } from "@/types/api";
|
||||
|
||||
export async function listPlatformReports(
|
||||
params: Record<string, string | number | boolean | null | undefined> = {},
|
||||
) {
|
||||
return fetchWithAuth<ReportsResponse>(apiEndpoints.reports.superAdmin(params));
|
||||
}
|
||||
|
||||
export async function updatePlatformReportStatus(
|
||||
reportId: string,
|
||||
status: ReportStatus,
|
||||
resolutionNote?: string,
|
||||
) {
|
||||
return fetchWithAuth<PlatformReport>(apiEndpoints.reports.updateStatus(reportId), {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify({ status, resolutionNote }),
|
||||
});
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم