Improve Comment model to support multiple comment type.

This commit is contained in:
2025-06-26 20:54:35 +08:00
parent f18465bba3
commit 5d0b201fde
7 changed files with 112 additions and 37 deletions

View File

@@ -1221,7 +1221,7 @@ function CommentInput({
return;
}
}
const res = await network.createComment(
const res = await network.createResourceComment(
resourceId,
commentContent,
imageIds,
@@ -1339,7 +1339,7 @@ function CommentsList({
const [comments, setComments] = useState<Comment[] | null>(null);
useEffect(() => {
network.listComments(resourceId, page).then((res) => {
network.listResourceComments(resourceId, page).then((res) => {
if (res.success) {
setComments(res.data!);
maxPageCallback(res.totalPages || 1);