ConvoyPanel/resources/scripts/api/server/settings/reinstallServer.ts
2023-01-04 03:47:27 +00:00

20 lines
553 B
TypeScript

import http from '@/api/http'
interface ReinstallServerParameters {
templateUuid: string
accountPassword?: string | null
startOnCompletion: boolean
}
const reinstallServer = (
serverUuid: string,
{ templateUuid, accountPassword, startOnCompletion }: ReinstallServerParameters
) => {
return http.post(`/api/client/servers/${serverUuid}/settings/reinstall`, {
template_uuid: templateUuid,
account_password: accountPassword,
start_on_completion: startOnCompletion,
})
}
export default reinstallServer