Fix: Install page redirects to signin if Dify finished setup. (#762)
This commit is contained in:
parent
cc7b5d128b
commit
6242e91a6b
5 changed files with 139 additions and 117 deletions
|
|
@ -3,8 +3,8 @@ import { del, get, patch, post, put } from './base'
|
|||
import type {
|
||||
AccountIntegrate, CommonResponse, DataSourceNotion,
|
||||
IWorkspace, LangGeniusVersionResponse, Member,
|
||||
OauthResponse, PluginProvider, Provider, ProviderAnthropicToken, ProviderAzureToken, TenantInfoResponse,
|
||||
UserProfileOriginResponse,
|
||||
OauthResponse, PluginProvider, Provider, ProviderAnthropicToken, ProviderAzureToken,
|
||||
SetupStatusResponse, TenantInfoResponse, UserProfileOriginResponse,
|
||||
} from '@/models/common'
|
||||
import type {
|
||||
UpdateOpenAIKeyResponse,
|
||||
|
|
@ -19,6 +19,10 @@ export const setup: Fetcher<CommonResponse, { body: Record<string, any> }> = ({
|
|||
return post('/setup', { body }) as Promise<CommonResponse>
|
||||
}
|
||||
|
||||
export const fetchSetupStatus = () => {
|
||||
return get('/setup') as Promise<SetupStatusResponse>
|
||||
}
|
||||
|
||||
export const fetchUserProfile: Fetcher<UserProfileOriginResponse, { url: string; params: Record<string, any> }> = ({ url, params }) => {
|
||||
return get(url, params, { needAllResponseContent: true }) as Promise<UserProfileOriginResponse>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue