mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Started work on hierachy conversion actions
- Updates book/shelf cover image handling for easier cloning/handling. - Adds core logic for promoting books/chapters up a level. - Enables usage of book/shelf cover image via API. Related to #1087
This commit is contained in:
@ -6,6 +6,7 @@ use BookStack\Entities\Models\Book;
|
||||
use BookStack\Entities\Models\Bookshelf;
|
||||
use BookStack\Entities\Models\Chapter;
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Entities\Repos\BaseRepo;
|
||||
use BookStack\Entities\Repos\BookRepo;
|
||||
use BookStack\Entities\Repos\BookshelfRepo;
|
||||
use Illuminate\Support\Str;
|
||||
@ -69,8 +70,8 @@ class OpenGraphTest extends TestCase
|
||||
$this->assertArrayNotHasKey('image', $tags);
|
||||
|
||||
// Test image set if image has cover image
|
||||
$shelfRepo = app(BookshelfRepo::class);
|
||||
$shelfRepo->updateCoverImage($shelf, $this->getTestImage('image.png'));
|
||||
$baseRepo = app(BaseRepo::class);
|
||||
$baseRepo->updateCoverImage($shelf, $this->getTestImage('image.png'));
|
||||
$resp = $this->asEditor()->get($shelf->getUrl());
|
||||
$tags = $this->getOpenGraphTags($resp);
|
||||
|
||||
|
Reference in New Issue
Block a user