Test
This commit is contained in:
parent
c41207be87
commit
ac515118f5
1 changed files with 5 additions and 5 deletions
|
@ -49,11 +49,9 @@ class PublicController extends BaseController
|
|||
}
|
||||
$size = $this->size[$sizeName];
|
||||
|
||||
$image = Image::query()->where("id", "=", $image);
|
||||
$gallery = Gallery::query()->where("id", "=", $gallery);
|
||||
$tenant = Tenant::query()->where("id", "=", $tenant);
|
||||
$cacheName = "cache/".$tenant->url."_".$gallery->url."_".$image->id;
|
||||
|
||||
$image = Image::query()->where("id", "=", $image)->firstOrFail();
|
||||
$gallery = Gallery::query()->where("id", "=", $gallery)->firstOrFail();
|
||||
$tenant = Tenant::query()->where("id", "=", $tenant)->firstOrFail();
|
||||
if($gallery != $gallery->url) {
|
||||
abort(404, "Gallery not match");
|
||||
}
|
||||
|
@ -62,6 +60,8 @@ class PublicController extends BaseController
|
|||
abort(404, "Tenant not match");
|
||||
}
|
||||
|
||||
$cacheName = "cache/".$tenant->url."_".$gallery->url."_".$image->id;
|
||||
|
||||
//Check if exsits in cache and return from it
|
||||
$r = $this->tryReturnFromCache($cacheName."_".$size, $tenant->id, $gallery->id, $image->id);
|
||||
if($r != null) {
|
||||
|
|
Loading…
Reference in a new issue