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: bookmark params changed

shuaiac18f302a6e6
diff --git a/ui/src/components/Actions/index.tsx b/ui/src/components/Actions/index.tsx
index 1ea00b0a..b8357105 100644
--- a/ui/src/components/Actions/index.tsx
+++ b/ui/src/components/Actions/index.tsx
@@ -125,9 +125,10 @@ const Index: FC<Props> = ({ className, data, source }) => {
bookmark({
group_id: '0',
object_id: data?.id,
+ bookmark: !bookmarkState.state,
}).then((res) => {
setBookmark({
- state: res.switch,
+ state: !bookmarkState.state,
count: res.object_collection_count,
});
});
diff --git a/ui/src/services/common.ts b/ui/src/services/common.ts
index f4efca73..251961d6 100644
--- a/ui/src/services/common.ts
+++ b/ui/src/services/common.ts
@@ -200,7 +200,11 @@ export const postAnswer = (params: Type.PostAnswerReq) => {
return request.post('/answer/api/v1/answer', params);
};
-export const bookmark = (params: { group_id: string; object_id: string }) => {
+export const bookmark = (params: {
+ group_id: string;
+ object_id: string;
+ bookmark: boolean;
+}) => {
return request.post('/answer/api/v1/collection/switch', params);
};