Skip to content

Commit 67a6641

Browse files
committed
Fix response
1 parent 8c37446 commit 67a6641

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/shared/hooks/useFetchContexts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Get } from 'shared/utils/request';
44

55
export const getContexts = async (spaceId: string, roomId: string, baseUrl: string) => {
66
const response = await Get({ path: `/v3/spaces/${spaceId}/rooms/${roomId}/contexts`, baseUrl });
7-
const { contexts = {} } = response || {};
7+
const { contexts = {} } = response?.data || {};
88
return Object.keys(contexts) as string[];
99
};
1010

src/shared/hooks/useFetchNodes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const getNodes = async (spaceId: string, roomId: string, baseUrl: string)
1111
},
1212
},
1313
});
14-
return response?.nodes;
14+
return response?.data?.nodes;
1515
};
1616

1717
export const useFetchNodes = (baseUrl: string) => {

0 commit comments

Comments
 (0)