1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-04 13:04:13 +08:00

40 lines
1.1 KiB
Go
Raw Normal View History

import http from '@/api';
import { ReqPage, ResPage } from '../interface';
import { App } from '../interface/app';
export const SyncApp = () => {
return http.post<any>('apps/sync', {});
};
export const SearchApp = (req: App.AppReq) => {
return http.post<App.AppResPage>('apps/search', req);
};
2022-09-23 16:33:55 +08:00
export const GetApp = (id: number) => {
return http.get<App.AppDTO>('apps/' + id);
};
export const GetAppDetail = (id: number, version: string) => {
2022-10-07 15:49:39 +08:00
return http.get<App.AppDetail>(`apps/detail/${id}/${version}`);
2022-09-23 16:33:55 +08:00
};
export const InstallApp = (install: App.AppInstall) => {
return http.post<any>('apps/install', install);
};
export const GetAppInstalled = (info: ReqPage) => {
return http.post<ResPage<App.AppInstalled>>('apps/installed', info);
};
2022-09-26 18:20:21 +08:00
export const InstalledOp = (op: App.AppInstalledOp) => {
return http.post<any>('apps/installed/op', op);
};
export const SyncInstalledApp = () => {
return http.post<any>('apps/installed/sync', {});
};
2022-10-07 15:49:39 +08:00
export const GetAppService = (key: string | undefined) => {
return http.get<any>(`apps/services/${key}`);
};