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