2020-07-10 04:36:08 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Network;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Allocation;
|
|
|
|
use Pterodactyl\Models\Permission;
|
|
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
|
|
|
|
class UpdateAllocationRequest extends ClientApiRequest
|
|
|
|
{
|
|
|
|
public function permission(): string
|
|
|
|
{
|
|
|
|
return Permission::ACTION_ALLOCATION_UPDATE;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function rules(): array
|
|
|
|
{
|
2020-07-11 05:17:28 +01:00
|
|
|
$rules = Allocation::getRules();
|
|
|
|
|
2020-07-10 04:36:08 +01:00
|
|
|
return [
|
2020-07-11 05:17:28 +01:00
|
|
|
'notes' => array_merge($rules['notes'], ['present']),
|
2020-07-10 04:36:08 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|