2018-02-27 22:09:34 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers;
|
|
|
|
|
2020-03-22 15:31:25 -07:00
|
|
|
use Pterodactyl\Models\Permission;
|
2018-02-27 22:09:34 -06:00
|
|
|
|
|
|
|
class SendCommandRequest extends GetServerRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the API user has permission to perform this action.
|
|
|
|
*
|
2020-03-22 15:31:25 -07:00
|
|
|
* @return string
|
2018-02-27 22:09:34 -06:00
|
|
|
*/
|
2020-03-22 15:31:25 -07:00
|
|
|
public function permission(): string
|
2018-02-27 22:09:34 -06:00
|
|
|
{
|
2020-03-22 15:31:25 -07:00
|
|
|
return Permission::ACTION_CONTROL_CONSOLE;
|
2018-02-27 22:09:34 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-05-13 10:50:56 -04:00
|
|
|
* Rules to validate this request against.
|
2018-02-27 22:09:34 -06:00
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
2018-02-28 22:51:04 -06:00
|
|
|
'command' => 'required|string|min:1',
|
2018-02-27 22:09:34 -06:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|