mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-03 12:55:41 -05:00
30 lines
677 B
PHP
30 lines
677 B
PHP
<?php
|
|||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Pterodactyl\Http\Requests\Api\Admin\Nodes\Allocations;
|
||
|
|
|
||
|
|
use Pterodactyl\Enum\Permissions;
|
||
|
|
use Pterodactyl\Http\Requests\Api\Admin\AdminApiRequest;
|
||
|
|
|
||
|
|
class BulkDeleteAllocationRequest extends AdminApiRequest
|
||
|
|
{
|
||
|
|
public function permissions(): array
|
||
|
|
{
|
||
|
|
return [Permissions::AdminAllocationsDelete];
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* `ids[]` is required (not legacy `sometimes`) so a malformed body 422s rather than silently 204-ing.
|
||
|
|
*
|
||
|
|
* @return ValidationRules
|
||
|
|
*/
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'ids' => ['required', 'array'],
|
||
|
|
'ids.*' => ['integer'],
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|