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>(`/nginx`);
|
|
|
|
};
|
2022-11-24 10:28:39 +08:00
|
|
|
|
|
|
|
export const GetNginxConfigByScope = (req: Nginx.NginxScopeReq) => {
|
|
|
|
return http.post<Nginx.NginxParam[]>(`/nginx/scope`, req);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const UpdateNginxConfigByScope = (req: Nginx.NginxConfigReq) => {
|
|
|
|
return http.post<any>(`/nginx/update`, req);
|
|
|
|
};
|
2022-11-24 16:06:18 +08:00
|
|
|
|
|
|
|
export const GetNginxStatus = () => {
|
|
|
|
return http.get<Nginx.NginxStatus>(`/nginx/status`);
|
|
|
|
};
|