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

24 lines
693 B
Go
Raw Normal View History

2022-11-23 16:19:05 +08:00
import http from '@/api';
import { File } from '../interface/file';
2022-11-24 10:28:39 +08:00
import { Nginx } from '../interface/nginx';
2022-11-23 16:19:05 +08:00
export const GetNginx = () => {
return http.get<File.File>(`/openresty`);
2022-11-23 16:19:05 +08:00
};
2022-11-24 10:28:39 +08:00
export const GetNginxConfigByScope = (req: Nginx.NginxScopeReq) => {
return http.post<Nginx.NginxParam[]>(`/openresty/scope`, req);
2022-11-24 10:28:39 +08:00
};
export const UpdateNginxConfigByScope = (req: Nginx.NginxConfigReq) => {
return http.post<any>(`/openresty/update`, req);
2022-11-24 10:28:39 +08:00
};
2022-11-24 16:06:18 +08:00
export const GetNginxStatus = () => {
return http.get<Nginx.NginxStatus>(`/openresty/status`);
2022-11-24 16:06:18 +08:00
};
2022-12-09 17:16:07 +08:00
export const UpdateNginxConfigFile = (req: Nginx.NginxFileUpdate) => {
return http.post<any>(`/openresty/file`, req);
2022-12-09 17:16:07 +08:00
};