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 <[email protected]>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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 })
|
||||
}
|
||||
Reference in New Issue
Block a user