diff --git a/app/Observers/EntityObserver.php b/app/Observers/EntityObserver.php index 64dbd6adf5..a9a8a1990e 100644 --- a/app/Observers/EntityObserver.php +++ b/app/Observers/EntityObserver.php @@ -12,6 +12,7 @@ use App\Services\ImageService; use App\Services\PermissionService; use Illuminate\Support\Str; +use App\Facades\Domain; class EntityObserver { @@ -227,10 +228,9 @@ public function saveBoosted(Entity $entity): void // Gallery is now available to all if (request()->has('entity_image_uuid')) { $entity->image_uuid = request()->get('entity_image_uuid'); - } else { + } elseif (Domain::isApp()) { $entity->image_uuid = null; } - // No changed for non-boosted campaigns if (!$entity->campaign->boosted()) { $entity->save(); @@ -249,7 +249,7 @@ public function saveBoosted(Entity $entity): void if ($entity->campaign->superboosted()) { if (request()->has('entity_header_uuid')) { $entity->header_uuid = request()->get('entity_header_uuid'); - } else { + } elseif (Domain::isApp()) { $entity->header_uuid = null; } }