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

24 lines
745 B
Go
Raw Normal View History

2022-08-31 23:16:10 +08:00
import http from '@/api';
import { ResPage } from '../interface';
import { Command } from '../interface/command';
export const getCommandList = () => {
return http.get<Array<Command.CommandInfo>>(`/commands`, {});
};
export const getCommandPage = (params: Command.CommandSearch) => {
return http.post<ResPage<Command.CommandInfo>>(`/commands/search`, params);
};
export const addCommand = (params: Command.CommandOperate) => {
return http.post<Command.CommandOperate>(`/commands`, params);
};
export const editCommand = (params: Command.CommandOperate) => {
return http.put(`/commands/${params.id}`, params);
};
export const deleteCommand = (params: { ids: number[] }) => {
return http.post(`/commands/del`, params);
};