forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRenameFileRequest.php
More file actions
30 lines (26 loc) · 823 Bytes
/
RenameFileRequest.php
File metadata and controls
30 lines (26 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Files;
use Pterodactyl\Models\Permission;
use Pterodactyl\Contracts\Http\ClientPermissionsRequest;
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
class RenameFileRequest extends ClientApiRequest implements ClientPermissionsRequest
{
/**
* The permission the user is required to have in order to perform this
* request action.
*/
public function permission(): string
{
return Permission::ACTION_FILE_UPDATE;
}
public function rules(): array
{
return [
'root' => 'required|nullable|string',
'files' => 'required|array',
'files.*' => 'array',
'files.*.to' => 'required|string',
'files.*.from' => 'required|string',
];
}
}