Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: fetch bookmark handler (#711)

STEVEN09f8fe0799c1
diff --git a/frontend/src/store/modules/bookmark.ts b/frontend/src/store/modules/bookmark.ts
index e8455b60cf..3cf21911e2 100644
--- a/frontend/src/store/modules/bookmark.ts
+++ b/frontend/src/store/modules/bookmark.ts
@@ -56,13 +56,10 @@ const actions = {
) {
// API only returns bookmark for the requesting user.
// User info is retrieved from the context.
- const bookmarkList = (
- await axios.get(`/api/bookmark/user/${userId}`)
- ).data.data.map(
- (bookmark: ResourceObject, includedList: ResourceObject[]) => {
- return convert(bookmark, includedList, rootGetters);
- }
- );
+ const data = (await axios.get(`/api/bookmark/user/${userId}`)).data;
+ const bookmarkList = data.data.map((bookmark: ResourceObject) => {
+ return convert(bookmark, data.included, rootGetters);
+ });
commit("setBookmarkListByPrincipalId", { userId, bookmarkList });
return bookmarkList;
},