Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Http/Requests/Api/Client/Servers/Network/UpdateAllocationRequest.php
10284 views
1
<?php
2
3
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Network;
4
5
use Pterodactyl\Models\Allocation;
6
use Pterodactyl\Models\Permission;
7
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
8
9
class UpdateAllocationRequest extends ClientApiRequest
10
{
11
public function permission(): string
12
{
13
return Permission::ACTION_ALLOCATION_UPDATE;
14
}
15
16
public function rules(): array
17
{
18
$rules = Allocation::getRules();
19
20
return [
21
'notes' => array_merge($rules['notes'], ['present']),
22
];
23
}
24
}
25
26