mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-18 13:36:50 +08:00
12 lines
273 B
TypeScript
12 lines
273 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
|