Files
tonePage/tone-page-web/lib/api/blog/createComment.ts
2025-06-07 13:49:33 +08:00

9 lines
302 B
TypeScript

import { BlogComment } from "@/lib/types/blogComment";
import fetcher from "../fetcher";
export async function createComment(blogId: string, content: string) {
return fetcher<BlogComment>(`/api/blog/${blogId}/comment`, {
method: 'POST',
body: JSON.stringify({ content }),
});
}