]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Controllers/BookController.php
Input WYSIWYG: Added description_html field, added store logic
[bookstack] / app / Entities / Controllers / BookController.php
index 12df935b0a649a258e1c080fc907bb317c11a12e..481c621e6df5eef7adcd530443dfaae3781c8d16 100644 (file)
@@ -92,11 +92,11 @@ class BookController extends Controller
     {
         $this->checkPermission('book-create-all');
         $validated = $this->validate($request, [
-            'name'              => ['required', 'string', 'max:255'],
-            'description'       => ['string', 'max:1000'],
-            'image'             => array_merge(['nullable'], $this->getImageValidationRules()),
-            'tags'              => ['array'],
-            'default_template => ['nullable', 'integer'],
+            'name'                => ['required', 'string', 'max:255'],
+            'description_html'    => ['string', 'max:2000'],
+            'image'               => array_merge(['nullable'], $this->getImageValidationRules()),
+            'tags'                => ['array'],
+            'default_template_id' => ['nullable', 'integer'],
         ]);
 
         $bookshelf = null;
@@ -167,11 +167,11 @@ class BookController extends Controller
         $this->checkOwnablePermission('book-update', $book);
 
         $validated = $this->validate($request, [
-            'name'              => ['required', 'string', 'max:255'],
-            'description'       => ['string', 'max:1000'],
-            'image'             => array_merge(['nullable'], $this->getImageValidationRules()),
-            'tags'              => ['array'],
-            'default_template => ['nullable', 'integer'],
+            'name'                => ['required', 'string', 'max:255'],
+            'description_html'    => ['string', 'max:2000'],
+            'image'               => array_merge(['nullable'], $this->getImageValidationRules()),
+            'tags'                => ['array'],
+            'default_template_id' => ['nullable', 'integer'],
         ]);
 
         if ($request->has('image_reset')) {