mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 20:27:45 +00:00
feat: Text check before synchronization (#689)
* fix: icon * fix: web selector * fix: web selector * perf: link sync * dev doc * chomd doc * perf: git intro * 466 intro * intro img * add json editor (#5) * team limit * websync limit * json editor * text editor * perf: search test * change cq value type * doc * intro img --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,10 @@ import type {
|
||||
} from '@/global/core/dataset/api.d';
|
||||
import type { PushDataResponse } from '@/global/core/api/datasetRes.d';
|
||||
import type { DatasetCollectionItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constant';
|
||||
import {
|
||||
DatasetCollectionSyncResultEnum,
|
||||
DatasetTypeEnum
|
||||
} from '@fastgpt/global/core/dataset/constant';
|
||||
import type { DatasetDataItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import type { DatasetCollectionsListItemType } from '@/global/core/dataset/type.d';
|
||||
import { PagingData } from '@/types';
|
||||
@@ -56,9 +59,6 @@ export const postWebsiteSync = (data: PostWebsiteSyncParams) =>
|
||||
timeout: 600000
|
||||
}).catch();
|
||||
|
||||
export const getCheckExportLimit = (datasetId: string) =>
|
||||
GET(`/core/dataset/checkExportLimit`, { datasetId });
|
||||
|
||||
/* =========== search test ============ */
|
||||
export const postSearchText = (data: SearchTestProps) =>
|
||||
POST<SearchTestResponse>(`/core/dataset/searchTest`, data);
|
||||
@@ -77,7 +77,9 @@ export const putDatasetCollectionById = (data: UpdateDatasetCollectionParams) =>
|
||||
export const delDatasetCollectionById = (params: { collectionId: string }) =>
|
||||
DELETE(`/core/dataset/collection/delete`, params);
|
||||
export const postLinkCollectionSync = (collectionId: string) =>
|
||||
POST(`/core/dataset/collection/sync/link`, { collectionId });
|
||||
POST<`${DatasetCollectionSyncResultEnum}`>(`/core/dataset/collection/sync/link`, {
|
||||
collectionId
|
||||
});
|
||||
|
||||
/* =============================== data ==================================== */
|
||||
/* get dataset list */
|
||||
|
@@ -13,6 +13,7 @@ import { defaultDatasetDetail } from '@/constants/dataset';
|
||||
import type { DatasetUpdateBody } from '@fastgpt/global/core/dataset/api.d';
|
||||
import { DatasetStatusEnum } from '@fastgpt/global/core/dataset/constant';
|
||||
import { postCreateTrainingBill } from '@/web/support/wallet/bill/api';
|
||||
import { checkTeamWebSyncLimit } from '@/web/support/user/api';
|
||||
|
||||
type State = {
|
||||
allDatasets: DatasetListItemType[];
|
||||
@@ -86,6 +87,8 @@ export const useDatasetStore = create<State>()(
|
||||
});
|
||||
},
|
||||
async startWebsiteSync() {
|
||||
await checkTeamWebSyncLimit();
|
||||
|
||||
const [_, billId] = await Promise.all([
|
||||
get().updateDataset({
|
||||
id: get().datasetDetail._id,
|
||||
|
@@ -71,3 +71,8 @@ export const postLogin = ({ password, ...props }: PostLoginProps) =>
|
||||
export const loginOut = () => GET('/support/user/account/loginout');
|
||||
|
||||
export const putUserInfo = (data: UserUpdateParams) => PUT('/support/user/account/update', data);
|
||||
|
||||
/* team limit */
|
||||
export const checkTeamExportDatasetLimit = (datasetId: string) =>
|
||||
GET(`/support/user/team/limit/exportDatasetLimit`, { datasetId });
|
||||
export const checkTeamWebSyncLimit = () => GET(`/support/user/team/limit/webSyncLimit`);
|
||||
|
Reference in New Issue
Block a user