Files
gig-admin/src/api/modules/comments.ts
kongkx 999d5353fd feat(moderation): comment/event report and dimzou translation pages
New 内容审核 nav group covering the remaining admin API groups:
- /comment-reports — status filter; hide/delete comment or dismiss
- /event-reports — status filter; hide/delete/resolve/dismiss
- /dimzou-translations — language/status filters, draft block progress,
  requeue machine translation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 13:28:28 +08:00

15 lines
537 B
TypeScript

import { api } from '@/api/client'
import type { ApiResponse, CommentReport, ListParams, PaginatedResponse } from '@/api/types'
const BASE = '/api/admin/v1/comments'
export type CommentReportAction = 'hide' | 'delete' | 'dismiss'
export function fetchCommentReports(params: ListParams) {
return api.get<PaginatedResponse<CommentReport>>(`${BASE}/reports`, params)
}
export function handleCommentReport(id: number, action: CommentReportAction) {
return api.patch<ApiResponse<CommentReport>>(`${BASE}/reports/${id}`, { action })
}