1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-23 17:42:33 +01:00
Pterodactyl-Panel/app/Repositories/Daemon/CommandRepository.php
2018-01-05 18:27:47 -06:00

26 lines
704 B
PHP

<?php
namespace Pterodactyl\Repositories\Daemon;
use Psr\Http\Message\ResponseInterface;
use Pterodactyl\Contracts\Repository\Daemon\CommandRepositoryInterface;
class CommandRepository extends BaseRepository implements CommandRepositoryInterface
{
/**
* Send a command to a server.
*
* @param string $command
* @return \Psr\Http\Message\ResponseInterface
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function send(string $command): ResponseInterface
{
return $this->getHttpClient()->request('POST', 'server/command', [
'json' => [
'command' => $command,
],
]);
}
}