mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-15 12:53:44 +02:00
Complete base implementation of services for administrative server creation
This commit is contained in:
@@ -59,7 +59,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
||||
'io' => (int) $server->io,
|
||||
'cpu' => (int) $server->cpu,
|
||||
'disk' => (int) $server->disk,
|
||||
'image' => (int) $server->image,
|
||||
'image' => $server->image,
|
||||
],
|
||||
'service' => [
|
||||
'type' => $server->option->service->folder,
|
||||
@@ -97,9 +97,15 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function reinstall()
|
||||
public function reinstall($data = null)
|
||||
{
|
||||
return $this->getHttpClient()->request('POST', '/server/reinstall');
|
||||
if (is_null($data)) {
|
||||
return $this->getHttpClient()->request('POST', '/server/reinstall');
|
||||
}
|
||||
|
||||
return $this->getHttpClient()->request('POST', '/server/reinstall', [
|
||||
'json' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,4 +131,12 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
||||
{
|
||||
return $this->getHttpClient()->request('POST', '/server/unsuspend');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
return $this->getHttpClient()->request('DELETE', '/servers');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user