Files
tonePage/tone-page-web/lib/api/blog/createComment.ts
2025-06-07 03:21:27 +08:00

15 lines
428 B
TypeScript

import fetcher from "../fetcher";
export async function createComment(blogId: string, content: string) {
return fetcher<{
blogId: string;
content: string;
createdAt: string
deletedAt: null; // 原则上能看到就是null
id: string;
parentId: string | null;
}>(`/api/blog/${blogId}/comment`, {
method: 'POST',
body: JSON.stringify({ content }),
});
}