Fast Log add tenant

This commit is contained in:
Kekskurse 2021-01-21 01:40:38 +01:00
parent 6dd1e70e03
commit 117d7b0cae

View file

@ -61,8 +61,9 @@ class PublicController extends BaseController
public function returnWatermakeFile(\App\Helper\Image $imageHelper, \App\Helper\Access $accessHelper) { public function returnWatermakeFile(\App\Helper\Image $imageHelper, \App\Helper\Access $accessHelper) {
$tenant = Tenant::query()->where("id", "=", session("current_tenant_id"))->firstOrFail(); $tenant = Tenant::query()->where("id", "=", session("current_tenant_id"))->firstOrFail();
$img = $imageHelper->getRawImage($tenant->watermark); $imageModel = Image::query()->where("id", "=", $tenant->watermark)->firstOrFail();
$accessHelper->addById($tenant->watermark, $img, \App\Helper\Access::TYPE_CACHE); $img = $imageHelper->getRawImage($imageModel);
$accessHelper->add($imageModel, $img, \App\Helper\Access::TYPE_CACHE);
return $img->response(); return $img->response();
} }