1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Got chapter conversion to books working

- Added required UI within edit view.
- Added required routes and controller actions.
This commit is contained in:
Dan Brown
2022-06-14 16:42:29 +01:00
parent 90ec40691a
commit 8da856bac3
7 changed files with 69 additions and 6 deletions

View File

@ -91,7 +91,7 @@ class BookRepo
{
$book = new Book();
$this->baseRepo->create($book, $input);
$this->baseRepo->updateCoverImage($book, $input['image']);
$this->baseRepo->updateCoverImage($book, $input['image'] ?? null);
Activity::add(ActivityType::BOOK_CREATE, $book);
return $book;
@ -104,7 +104,7 @@ class BookRepo
{
$this->baseRepo->update($book, $input);
if (isset($input['image'])) {
if (array_key_exists('image', $input)) {
$this->baseRepo->updateCoverImage($book, $input['image'], $input['image'] === null);
}