This commit is contained in:
Kekskurse 2021-01-17 03:08:41 +01:00
parent 5f5282e9b6
commit 26939ba1ad

View file

@ -52,11 +52,11 @@ class PublicController extends BaseController
$image = Image::query()->where("id", "=", $image_id)->firstOrFail();
$gallery = Gallery::query()->where("url", "=", $gallery_url)->firstOrFail();
$tenant = Tenant::query()->where("url", "=", $tenant_url)->firstOrFail();
if($gallery != $gallery->url) {
if($image->gallery != $gallery->id) {
abort(404, "Gallery not match");
}
if($tenant != $tenant->url) {
if($gallery->tenant != $tenant->id) {
abort(404, "Tenant not match");
}