mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 10:56:52 +08:00
fix: frontend permission check (#784)
This commit is contained in:
@@ -2,6 +2,7 @@ import type { Fetcher } from 'swr'
|
||||
import { del, get, patch, post, put } from './base'
|
||||
import type {
|
||||
AccountIntegrate, CommonResponse, DataSourceNotion,
|
||||
ICurrentWorkspace,
|
||||
IWorkspace, LangGeniusVersionResponse, Member,
|
||||
OauthResponse, PluginProvider, Provider, ProviderAnthropicToken, ProviderAzureToken,
|
||||
SetupStatusResponse, TenantInfoResponse, UserProfileOriginResponse,
|
||||
@@ -87,6 +88,10 @@ export const fetchFilePreview: Fetcher<{ content: string }, { fileID: string }>
|
||||
return get(`/files/${fileID}/preview`) as Promise<{ content: string }>
|
||||
}
|
||||
|
||||
export const fetchCurrentWorkspace: Fetcher<ICurrentWorkspace, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
||||
return get(url, { params }) as Promise<ICurrentWorkspace>
|
||||
}
|
||||
|
||||
export const fetchWorkspaces: Fetcher<{ workspaces: IWorkspace[] }, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
||||
return get(url, { params }) as Promise<{ workspaces: IWorkspace[] }>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user