1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Started work on revisions in image manager

This commit is contained in:
Dan Brown
2018-05-19 18:44:40 +01:00
parent 13ad0031d6
commit 6cdb943916
6 changed files with 73 additions and 7 deletions

View File

@ -257,6 +257,18 @@ class ImageController extends Controller
return response()->json($pageSearch);
}
/**
* Get the revisions for an image.
* @param $id
* @return \Illuminate\Http\JsonResponse
*/
public function getRevisions($id)
{
$image = $this->imageRepo->getById($id);
$revisions = $image->revisions()->orderBy('id', 'desc')->get();
return response()->json($revisions);
}
/**
* Deletes an image and all thumbnail/image files
* @param int $id