Store node daemon tokens in an encrypted manner
This commit is contained in:
parent
2ac82af25a
commit
7557dddf49
26 changed files with 222 additions and 827 deletions
|
@ -23,4 +23,22 @@ class DaemonConfigurationRepository extends DaemonRepository
|
|||
|
||||
return json_decode($response->getBody()->__toString(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the configuration information for a daemon.
|
||||
*
|
||||
* @param array $attributes
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
*/
|
||||
public function update(array $attributes = [])
|
||||
{
|
||||
try {
|
||||
return $this->getHttpClient()->post(
|
||||
'/api/update', array_merge($this->node->getConfiguration(), $attributes)
|
||||
);
|
||||
} catch (TransferException $exception) {
|
||||
throw new DaemonConnectionException($exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue