mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-04 13:04:13 +08:00
24 lines
745 B
Go
24 lines
745 B
Go
![]() |
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);
|
||
|
};
|