16 أسطر
566 B
TypeScript
16 أسطر
566 B
TypeScript
import { apiEndpoints } from "@/lib/api/endpoints";
|
|
import { fetchWithAuth } from "@/lib/auth/client";
|
|
import type { CommentsResponse, SuccessMessage } from "@/types/api";
|
|
|
|
export async function listModerationComments(
|
|
params: Record<string, string | number | boolean | null | undefined> = {},
|
|
) {
|
|
return fetchWithAuth<CommentsResponse>(apiEndpoints.comments.moderation(params));
|
|
}
|
|
|
|
export async function deleteAdminComment(commentId: string) {
|
|
return fetchWithAuth<SuccessMessage>(apiEndpoints.comments.adminDelete(commentId), {
|
|
method: "DELETE",
|
|
});
|
|
}
|