Skip to content

Commit 4a8f702

Browse files
authored
added template to chapter API controller
1 parent 64c783c commit 4a8f702

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

app/Entities/Controllers/ChapterApiController.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,22 @@ class ChapterApiController extends ApiController
1515
{
1616
protected $rules = [
1717
'create' => [
18-
'book_id' => ['required', 'integer'],
19-
'name' => ['required', 'string', 'max:255'],
20-
'description' => ['string', 'max:1900'],
21-
'description_html' => ['string', 'max:2000'],
22-
'tags' => ['array'],
23-
'priority' => ['integer'],
18+
'book_id' => ['required', 'integer'],
19+
'name' => ['required', 'string', 'max:255'],
20+
'description' => ['string', 'max:1900'],
21+
'description_html' => ['string', 'max:2000'],
22+
'tags' => ['array'],
23+
'priority' => ['integer'],
24+
'default_template_id' => ['nullable', 'integer'],
2425
],
2526
'update' => [
26-
'book_id' => ['integer'],
27-
'name' => ['string', 'min:1', 'max:255'],
28-
'description' => ['string', 'max:1900'],
29-
'description_html' => ['string', 'max:2000'],
30-
'tags' => ['array'],
31-
'priority' => ['integer'],
27+
'book_id' => ['integer'],
28+
'name' => ['string', 'min:1', 'max:255'],
29+
'description' => ['string', 'max:1900'],
30+
'description_html' => ['string', 'max:2000'],
31+
'tags' => ['array'],
32+
'priority' => ['integer'],
33+
'default_template_id' => ['nullable', 'integer'],
3234
],
3335
];
3436

0 commit comments

Comments
 (0)