1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-04 13:04:13 +08:00
2023-02-22 17:14:06 +08:00

24 lines
693 B
Go

import http from '@/api';
import { File } from '../interface/file';
import { Nginx } from '../interface/nginx';
export const GetNginx = () => {
return http.get<File.File>(`/openresty`);
};
export const GetNginxConfigByScope = (req: Nginx.NginxScopeReq) => {
return http.post<Nginx.NginxParam[]>(`/openresty/scope`, req);
};
export const UpdateNginxConfigByScope = (req: Nginx.NginxConfigReq) => {
return http.post<any>(`/openresty/update`, req);
};
export const GetNginxStatus = () => {
return http.get<Nginx.NginxStatus>(`/openresty/status`);
};
export const UpdateNginxConfigFile = (req: Nginx.NginxFileUpdate) => {
return http.post<any>(`/openresty/file`, req);
};