Files
panel/resources/scripts/api/server/updateState.ts
2023-11-06 04:20:25 +00:00

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