misc_pterodactyl-panel/app/Http/Requests/Api/Remote/ReportBackupCompleteRequest.php
Dane Everitt 4b919cabd2
Correctly validation API calls to mark a backup as completed
Also block modifying a backup that is already marked as completed via the endpoint
2020-08-27 19:35:22 -07:00

21 lines
535 B
PHP

<?php
namespace Pterodactyl\Http\Requests\Api\Remote;
use Illuminate\Foundation\Http\FormRequest;
class ReportBackupCompleteRequest extends FormRequest
{
/**
* @return string[]
*/
public function rules()
{
return [
'successful' => 'present|boolean',
'checksum' => 'nullable|string|required_if:successful,true',
'checksum_type' => 'nullable|string|required_if:successful,true',
'size' => 'nullable|numeric|required_if:successful,true',
];
}
}