mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-10 21:44:31 +08:00
11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
import http from '@/api/http'
|
|
|
|
export type PowerAction = 'start' | 'shutdown' | 'kill' | 'restart'
|
|
|
|
const updateState = (uuid: string, state: PowerAction) => {
|
|
return http.patch(`/api/client/servers/${uuid}/state`, {
|
|
state,
|
|
})
|
|
}
|
|
|
|
export default updateState |