20 lines
553 B
TypeScript
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
|