forked from yoone/WEB
87 lines
2.4 KiB
TypeScript
87 lines
2.4 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import { request } from 'umi';
|
|
|
|
/** 此处后端没有提供注释 GET /site/all */
|
|
export async function sitecontrollerAll(options?: { [key: string]: any }) {
|
|
return request<API.WpSitesResponse>('/site/all', {
|
|
method: 'GET',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /site/create */
|
|
export async function sitecontrollerCreate(
|
|
body: API.CreateSiteDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<any>('/site/create', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 PUT /site/disable/${param0} */
|
|
export async function sitecontrollerDisable(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.sitecontrollerDisableParams,
|
|
body: API.DisableSiteDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/site/disable/${param0}`, {
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /site/get/${param0} */
|
|
export async function sitecontrollerGet(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.sitecontrollerGetParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/site/get/${param0}`, {
|
|
method: 'GET',
|
|
params: { ...queryParams },
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /site/list */
|
|
export async function sitecontrollerList(options?: { [key: string]: any }) {
|
|
return request<any>('/site/list', {
|
|
method: 'GET',
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 PUT /site/update/${param0} */
|
|
export async function sitecontrollerUpdate(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.sitecontrollerUpdateParams,
|
|
body: API.UpdateSiteDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<any>(`/site/update/${param0}`, {
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|