Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(comment): change param `commentId` to `comment_id`

haitao(lj)463113282879
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsx
index f96ca77e..0f8da060 100644
--- a/ui/src/components/Comment/index.tsx
+++ b/ui/src/components/Comment/index.tsx
@@ -32,7 +32,7 @@ const Comment = ({ objectId, mode, commentId }) => {
const pageSize = pageIndex === 0 ? 3 : 15;
const { data, mutate } = useQueryComments({
object_id: objectId,
- commentId,
+ comment_id: commentId,
page: pageIndex,
page_size: pageSize,
});
diff --git a/ui/src/services/common.ts b/ui/src/services/common.ts
index 54ea69dc..903c7aec 100644
--- a/ui/src/services/common.ts
+++ b/ui/src/services/common.ts
@@ -40,7 +40,7 @@ export const useQueryComments = (params) => {
params.page = 1;
} else {
// only first page need commentId
- delete params.commentId;
+ delete params.comment_id;
}
return useSWR<Type.ListResult>(
`/answer/api/v1/comment/page?${qs.stringify(params, {