2020-04-04 18:59:25 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Servers\Backups;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Permission;
|
|
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
|
|
|
|
class StoreBackupRequest extends ClientApiRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function permission()
|
|
|
|
{
|
|
|
|
return Permission::ACTION_BACKUP_CREATE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
2020-04-04 20:26:39 +01:00
|
|
|
'name' => 'nullable|string|max:255|regex:/^[w\][\w\s_.-]*[\w]$/',
|
2020-04-04 18:59:25 +01:00
|
|
|
'ignore' => 'nullable|string',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|