mirror of
https://github.com/koel/koel
synced 2024-12-19 17:13:09 +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',
|
|
];
|
|
}
|
|
}
|