mirror of
https://github.com/koel/koel
synced 2024-12-27 21:13:06 +00:00
24 lines
438 B
PHP
24 lines
438 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\API;
|
|
|
|
/**
|
|
* @property array<string> $songs
|
|
* @property array<mixed> $data
|
|
*/
|
|
class SongUpdateRequest extends Request
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user()->is_admin;
|
|
}
|
|
|
|
/** @return array<mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'data' => 'required|array',
|
|
'songs' => 'required|array',
|
|
];
|
|
}
|
|
}
|