diff --git a/app/Jobs/Copyright/DeleteEntityImage.php b/app/Jobs/Copyright/DeleteEntityImage.php index 29d895b960..d3c105bef6 100644 --- a/app/Jobs/Copyright/DeleteEntityImage.php +++ b/app/Jobs/Copyright/DeleteEntityImage.php @@ -11,7 +11,6 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Log; -use Illuminate\Http\Request; use App\Services\ImageService; use App\Models\Entity; @@ -31,11 +30,11 @@ class DeleteEntityImage implements ShouldQueue * * @return void */ - public function __construct(Request $request) + public function __construct($data) { - $this->entityId = $request->post('entity'); - $this->removeHeader = $request->post('remove_header'); - $this->removeImage = $request->post('remove_image'); + $this->entityId = $data['entity']; + $this->removeHeader = $data['remove_header']; + $this->removeImage = $data['remove_image']; } /** @@ -52,7 +51,6 @@ public function handle() if ($this->removeHeader) { $this->deleteImage('header_image'); } - Log::info('Removed image or header from entity #' . $this->entityId . ' for copyright reasons'); } diff --git a/app/Services/Campaign/Notifications/ImageRemoveService.php b/app/Services/Campaign/Notifications/ImageRemoveService.php index 2312bcd29c..d4eae36c9c 100644 --- a/app/Services/Campaign/Notifications/ImageRemoveService.php +++ b/app/Services/Campaign/Notifications/ImageRemoveService.php @@ -27,7 +27,7 @@ public function notify(): void $colour, [ 'entity' => $this->entity->name, - 'link' => $this->entity->url(), + 'link' => route('entities.show', [$this->entity, $this->campaign]), ] ); }