mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 03:46:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			651 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			651 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Pterodactyl\Http\Requests\Api\Client\Servers;
 | |
| 
 | |
| use Pterodactyl\Models\Permission;
 | |
| use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
 | |
| 
 | |
| class SendCommandRequest extends ClientApiRequest
 | |
| {
 | |
|     /**
 | |
|      * Determine if the API user has permission to perform this action.
 | |
|      *
 | |
|      * @return string
 | |
|      */
 | |
|     public function permission(): string
 | |
|     {
 | |
|         return Permission::ACTION_CONTROL_CONSOLE;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Rules to validate this request against.
 | |
|      *
 | |
|      * @return array
 | |
|      */
 | |
|     public function rules(): array
 | |
|     {
 | |
|         return [
 | |
|             'command' => 'required|string|min:1',
 | |
|         ];
 | |
|     }
 | |
| }
 | 
