]> 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)
1  2 
app/Entities/Controllers/PageApiController.php

index c83126df9736dd4164bd484d6e8b4c3b6c80fd2a,0e8893450fe8e906522c96cea463cea61f4e2f6b..d2947f1bb7227c560214fba3e472c0cb2ef0b5d1
@@@ -13,8 -13,6 +13,6 @@@ use Illuminate\Http\Request
  
  class PageApiController extends ApiController
  {
-     protected PageRepo $pageRepo;
      protected $rules = [
          'create' => [
              'book_id'    => ['required_without:chapter_id', 'integer'],
@@@ -23,7 -21,6 +21,7 @@@
              'html'       => ['required_without:markdown', 'string'],
              'markdown'   => ['required_without:html', 'string'],
              'tags'       => ['array'],
 +            'priority'   => ['integer'],
          ],
          'update' => [
              'book_id'    => ['integer'],
              'html'       => ['string'],
              'markdown'   => ['string'],
              'tags'       => ['array'],
 +            'priority'   => ['integer'],
          ],
      ];
  
-     public function __construct(PageRepo $pageRepo)
-     {
-         $this->pageRepo = $pageRepo;
+     public function __construct(
+         protected PageRepo $pageRepo
+     ) {
      }
  
      /**
  
      /**
       * View the details of a single page.
-      *
       * Pages will always have HTML content. They may have markdown content
       * if the markdown editor was used to last update the page.
       *
+      * The 'html' property is the fully rendered & escaped HTML content that BookStack
+      * would show on page view, with page includes handled.
+      * The 'raw_html' property is the direct database stored HTML content, which would be
+      * what BookStack shows on page edit.
+      *
       * See the "Content Security" section of these docs for security considerations when using
       * the page content returned from this endpoint.
       */