1Panel/frontend/src/api/modules/nginx.ts
2023-02-22 17:14:06 +08:00

23 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);
};