added template to chapter API controller

This commit is contained in:
Sascha 2024-01-29 19:59:03 +01:00 committed by GitHub
parent 64c783c6f8
commit 4a8f70240f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 12 deletions

View File

@ -15,20 +15,22 @@ class ChapterApiController extends ApiController
{ {
protected $rules = [ protected $rules = [
'create' => [ 'create' => [
'book_id' => ['required', 'integer'], 'book_id' => ['required', 'integer'],
'name' => ['required', 'string', 'max:255'], 'name' => ['required', 'string', 'max:255'],
'description' => ['string', 'max:1900'], 'description' => ['string', 'max:1900'],
'description_html' => ['string', 'max:2000'], 'description_html' => ['string', 'max:2000'],
'tags' => ['array'], 'tags' => ['array'],
'priority' => ['integer'], 'priority' => ['integer'],
'default_template_id' => ['nullable', 'integer'],
], ],
'update' => [ 'update' => [
'book_id' => ['integer'], 'book_id' => ['integer'],
'name' => ['string', 'min:1', 'max:255'], 'name' => ['string', 'min:1', 'max:255'],
'description' => ['string', 'max:1900'], 'description' => ['string', 'max:1900'],
'description_html' => ['string', 'max:2000'], 'description_html' => ['string', 'max:2000'],
'tags' => ['array'], 'tags' => ['array'],
'priority' => ['integer'], 'priority' => ['integer'],
'default_template_id' => ['nullable', 'integer'],
], ],
]; ];