]> BookStack Code Mirror - bookstack/commitdiff
Merge branch 'BookStackApp:development' into add-priority
authorJean-René Rouet <redacted>
Tue, 11 Jul 2023 06:57:14 +0000 (08:57 +0200)
committerGitHub <redacted>
Tue, 11 Jul 2023 06:57:14 +0000 (08:57 +0200)
app/Api/ApiEntityListFormatter.php
app/Entities/Controllers/ChapterApiController.php
app/Entities/Controllers/PageApiController.php

index c170ecf0c9d51bf30b3fdb3b7ee270f936ef71a7..7d00834e5d1040c47eb56abe9c123674f4e683eb 100644 (file)
@@ -22,6 +22,7 @@ class ApiEntityListFormatter
     protected $fields = [
         'id', 'name', 'slug', 'book_id', 'chapter_id',
         'draft', 'template', 'created_at', 'updated_at',
+        'priority'
     ];
 
     public function __construct(array $list)
index 403c58de3c5a1a346c3e6f778a0b336c0ba1b23d..7f01e445a576d3d86cbbf097da50a09014472c44 100644 (file)
@@ -19,12 +19,14 @@ class ChapterApiController extends ApiController
             'name'        => ['required', 'string', 'max:255'],
             'description' => ['string', 'max:1000'],
             'tags'        => ['array'],
+            'priority'    => ['integer'],
         ],
         'update' => [
             'book_id'     => ['integer'],
             'name'        => ['string', 'min:1', 'max:255'],
             'description' => ['string', 'max:1000'],
             'tags'        => ['array'],
+            'priority'    => ['integer'],
         ],
     ];
 
index 0e8893450fe8e906522c96cea463cea61f4e2f6b..d2947f1bb7227c560214fba3e472c0cb2ef0b5d1 100644 (file)
@@ -21,6 +21,7 @@ class PageApiController extends ApiController
             'html'       => ['required_without:markdown', 'string'],
             'markdown'   => ['required_without:html', 'string'],
             'tags'       => ['array'],
+            'priority'   => ['integer'],
         ],
         'update' => [
             'book_id'    => ['integer'],
@@ -29,6 +30,7 @@ class PageApiController extends ApiController
             'html'       => ['string'],
             'markdown'   => ['string'],
             'tags'       => ['array'],
+            'priority'   => ['integer'],
         ],
     ];