mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
Publish histories (#1331)
* fix http plugin edge (#95) * fix http plugin edge * use getHandleId * perf: i18n file * feat: histories list * perf: request lock * fix: ts * move box components * fix: edit form refresh --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,7 @@ type State = {
|
||||
updateAppDetail(appId: string, data: AppUpdateParams): Promise<void>;
|
||||
publishApp(appId: string, data: PostPublishAppProps): Promise<void>;
|
||||
clearAppModules(): void;
|
||||
setAppDetail(data: AppDetailType): void;
|
||||
};
|
||||
|
||||
export const useAppStore = create<State>()(
|
||||
@@ -61,6 +62,11 @@ export const useAppStore = create<State>()(
|
||||
};
|
||||
});
|
||||
},
|
||||
setAppDetail(data: AppDetailType) {
|
||||
set((state) => {
|
||||
state.appDetail = data;
|
||||
});
|
||||
},
|
||||
|
||||
clearAppModules() {
|
||||
set((state) => {
|
||||
|
@@ -1,5 +1,13 @@
|
||||
import { PostPublishAppProps } from '@/global/core/app/api';
|
||||
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 { PaginationProps, PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
|
||||
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 postRevertVersion = (appId: string, data: PostRevertAppProps) =>
|
||||
POST(`/core/app/version/revert?appId=${appId}`, data);
|
||||
|
Reference in New Issue
Block a user