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

24 lines
740 B
Go
Raw Normal View History

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.post(`/commands/update`, params);
};
export const deleteCommand = (params: { ids: number[] }) => {
return http.post(`/commands/del`, params);
};