We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1eff85 commit 0330b6aCopy full SHA for 0330b6a
src/shared/hooks/useFetchContexts.ts
@@ -3,8 +3,9 @@ import React from 'react';
3
import { Get } from 'shared/utils/request';
4
5
export const getContexts = async (spaceId: string, roomId: string, baseUrl: string) => {
6
- const response = await Get({ path: `/v2/spaces/${spaceId}/rooms/${roomId}/contexts`, baseUrl });
7
- return response?.data?.results as string[];
+ const response = await Get({ path: `/v3/spaces/${spaceId}/rooms/${roomId}/contexts`, baseUrl });
+ const { contexts = {} } = response || {}
8
+ return Object.keys(contexts) as string[];
9
};
10
11
export const useFetchContexts = (baseUrl: string) => {
0 commit comments