remove invalid code (#2785)

This commit is contained in:
Archer
2024-09-25 09:49:51 +08:00
committed by shilin66
parent d4d3be34a6
commit 4f4f63735f
11 changed files with 95 additions and 192 deletions

View File

@@ -1,13 +1,13 @@
import { PostPublishAppProps, PostRevertAppProps } from '@/global/core/app/api';
import { GET, POST, DELETE, PUT } from '@/web/common/api/request';
import { AppVersionSchemaType } from '@fastgpt/global/core/app/version';
import type { AppVersionSchemaType } from '@fastgpt/global/core/app/version';
import { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
import type {
getLatestVersionQuery,
getLatestVersionResponse
} from '@/pages/api/core/app/version/latest';
import { UpdateAppVersionBody } from '@/pages/api/core/app/version/update';
import { versionListResponse } from '@/pages/api/core/app/version/listWorkflow';
import type { UpdateAppVersionBody } from '@/pages/api/core/app/version/update';
import type { versionListResponse } from '@/pages/api/core/app/version/list';
export const getAppLatestVersion = (data: getLatestVersionQuery) =>
GET<getLatestVersionResponse>('/core/app/version/latest', data);
@@ -15,17 +15,11 @@ export const getAppLatestVersion = (data: getLatestVersionQuery) =>
export const postPublishApp = (appId: string, data: PostPublishAppProps) =>
POST(`/core/app/version/publish?appId=${appId}`, data);
// export const getPublishList = (data: PaginationProps<{ appId: string }>) =>
// POST<PaginationResponse<AppVersionSchemaType>>('/core/app/version/list', data);
export const getWorkflowVersionList = (data: PaginationProps<{ appId: string }>) =>
POST<PaginationResponse<versionListResponse>>('/core/app/version/listWorkflow', data);
POST<PaginationResponse<versionListResponse>>('/core/app/version/list', data);
export const getAppVersionDetail = (versionId: string, appId: string) =>
GET<AppVersionSchemaType>(`/core/app/version/detail?versionId=${versionId}&appId=${appId}`);
// export const postRevertVersion = (appId: string, data: PostRevertAppProps) =>
// POST(`/core/app/version/revert?appId=${appId}`, data);
export const updateAppVersion = (data: UpdateAppVersionBody) =>
POST(`/core/app/version/update`, data);

View File

@@ -440,14 +440,14 @@ export const getLatestNodeTemplate = (
export const compareSnapshot = (
snapshot1: {
nodes: Node<FlowNodeItemType, string | undefined>[] | undefined;
nodes?: Node[];
edges: Edge<any>[] | undefined;
chatConfig: AppChatConfigType | undefined;
chatConfig?: AppChatConfigType;
},
snapshot2: {
nodes: Node<FlowNodeItemType, string | undefined>[];
nodes?: Node[];
edges: Edge<any>[];
chatConfig: AppChatConfigType;
chatConfig?: AppChatConfigType;
}
) => {
const clone1 = cloneDeep(snapshot1);