mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 20:05:48 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
32 lines
792 B
PHP
32 lines
792 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Files;
|
|
|
|
use Pterodactyl\Contracts\Http\ClientPermissionsRequest;
|
|
use Pterodactyl\Enum\Permissions;
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
class PullFileRequest extends ClientApiRequest implements ClientPermissionsRequest
|
|
{
|
|
public function permission(): string
|
|
{
|
|
return Permissions::FileCreate->value;
|
|
}
|
|
|
|
/**
|
|
* @return ValidationRules
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'url' => ['required', 'string', 'url'],
|
|
'directory' => ['nullable', 'string'],
|
|
'filename' => ['nullable', 'string'],
|
|
'use_header' => ['boolean'],
|
|
'foreground' => ['boolean'],
|
|
];
|
|
}
|
|
}
|