]> BookStack Code Mirror - bookstack/commitdiff
Merge branch 'chapter-templates' into development
authorDan Brown <redacted>
Thu, 1 Feb 2024 12:55:38 +0000 (12:55 +0000)
committerDan Brown <redacted>
Thu, 1 Feb 2024 12:55:38 +0000 (12:55 +0000)
1  2 
app/Entities/Controllers/ChapterApiController.php
dev/api/responses/chapters-create.json
dev/api/responses/chapters-update.json
tests/Api/ChaptersApiTest.php

index 2d40444058751c6affd3dd819b0a81a8359e1a32,1e81a1e6363fc575770836aba0261f5ef3b48fed..3711d1cc9d6cea5248242e152dda3c9980ffb835
@@@ -11,7 -11,7 +11,8 @@@
    "updated_by": 1,
    "owned_by": 1,
    "description_html": "<p>This is a <strong>great new chapter<\/strong> that I've created via the API<\/p>",
+   "default_template_id": 25,
 +  "book_slug": "example-book",
    "tags": [
      {
        "name": "Category",
@@@ -24,4 -24,4 +25,4 @@@
        "order": 0
      }
    ]
--}
++}
index 3dad6aa0c12245c4ae4cdd870a96eb637a384ad5,4d8d0024e6ae5bce265adedf3c48fedd03a43a3a..96784dcedf7da605d962c2ddd39c6adeffaeb5f1
@@@ -11,7 -11,7 +11,8 @@@
    "updated_by": 1,
    "owned_by": 1,
    "description_html": "<p>This is an <strong>updated chapter<\/strong> that I've altered via the API<\/p>",
+   "default_template_id": 2428,
 +  "book_slug": "example-book",
    "tags": [
      {
        "name": "Category",
@@@ -24,4 -24,4 +25,4 @@@
        "order": 0
      }
    ]
--}
++}
index 002046c3a3b2388ab56fc89f5bfeff03e64fed5d,fdb80a4973eb761dfbb65437337314da4628ccb3..e2d6cfc81f0a8ce5e12172c7f4c793787feff2e4
@@@ -149,8 -149,8 +151,9 @@@ class ChaptersApiTest extends TestCas
                      'name' => $page->name,
                  ],
              ],
+             'default_template_id' => null,
          ]);
 +        $resp->assertJsonMissingPath('book');
          $resp->assertJsonCount($chapter->pages()->count(), 'pages');
      }