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:
@ -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
|
||||
|
Reference in New Issue
Block a user