mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-01 05:23:47 +08:00
Refactor variable of front end (#13953)
### What problem does this PR solve? api_host -> webAPI ExternalApi -> restAPIv1 ### Type of change - [x] Refactoring <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Updated internal API endpoint configuration to use consolidated base URL constants for improved maintainability and consistency across the application. * **Chores** * Updated server-side protocol validation for admin connectivity checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Authorization } from '@/constants/authorization';
|
||||
import { useGetKnowledgeSearchParams } from '@/hooks/route-hook';
|
||||
import { useGetPipelineResultSearchParams } from '@/pages/dataflow-result/hooks';
|
||||
import api, { api_host } from '@/utils/api';
|
||||
import api, { webAPI } from '@/utils/api';
|
||||
import { getAuthorization } from '@/utils/authorization-util';
|
||||
import jsPreviewExcel from '@js-preview/excel';
|
||||
import { useSize } from 'ahooks';
|
||||
@@ -57,7 +57,7 @@ export const useGetDocumentUrl = (isAgent: boolean) => {
|
||||
if (isAgent) {
|
||||
return api.downloadFile + `?id=${id}&created_by=${createdBy}`;
|
||||
}
|
||||
return `${api_host}/document/get/${documentId}`;
|
||||
return `${webAPI}/document/get/${documentId}`;
|
||||
}, [createdBy, documentId, id, isAgent]);
|
||||
|
||||
return url;
|
||||
|
||||
Reference in New Issue
Block a user