Drawings now generate revisions, not replace

Updated drawing update test to accomodate.
Image deletion system now takes revisions into account.
This commit is contained in:
Dan Brown
2018-05-13 17:41:35 +01:00
parent d5b922aa50
commit 13ad0031d6
8 changed files with 112 additions and 40 deletions

View File

@ -160,9 +160,9 @@ class ImageRepo
* @return Image
* @throws \BookStack\Exceptions\ImageUploadException
*/
public function replaceDrawingContent(Image $image, string $base64Uri)
public function updateDrawing(Image $image, string $base64Uri)
{
return $this->imageService->replaceImageDataFromBase64Uri($image, $base64Uri);
return $this->imageService->updateImageFromBase64Uri($image, $base64Uri);
}
/**
@ -183,13 +183,14 @@ class ImageRepo
/**
* Destroys an Image object along with its files and thumbnails.
* Destroys an Image object along with its revisions, files and thumbnails.
* @param Image $image
* @return bool
* @throws \Exception
*/
public function destroyImage(Image $image)
{
$this->imageService->destroyImage($image);
$this->imageService->destroy($image);
return true;
}