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

13 lines
442 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import fetcher from "../fetcher";
export async function getComments(blogId: string) {
return fetcher<{
blogId: string;
content: string;
createdAt: string;
deletedAt: string | null;// 原则上能看到就是null
id: string;
parentId: string | null; // 如果是回复则有parentId
user: null;// TODO需要完善
}[]>(`/api/blog/${blogId}/comments`, { method: 'GET' });
}