fix: ui fixes report

This commit is contained in:
gosangam
2026-06-16 19:03:17 +05:30
parent 82566e23bb
commit 8b7ae1e7a2
2 changed files with 162 additions and 57 deletions
+7 -2
View File
@@ -161,6 +161,8 @@ export type AdminReport = {
resolved_at: string | null;
reporter_handle: string | null;
reporter_name: string | null;
resolution_note: string | null;
target_removed: boolean;
target_id: string;
target_text: string | null;
target_author_handle: string | null;
@@ -286,7 +288,10 @@ export const api = {
reports(type: ReportType, q: string, limit: number, offset: number) {
return listed<AdminReport>(`/admin/reports${qs({ type, q, limit, offset })}`);
},
resolveReport(type: ReportType, id: string) {
return call(`/admin/reports/${type}/${id}/resolve`, { method: "POST" });
resolveReport(type: ReportType, id: string, note: string) {
return call(`/admin/reports/${type}/${id}/resolve`, {
method: "POST",
body: JSON.stringify({ note }),
});
},
};