From bf9f3523fde3f0fe22e3354b159ca50fbae916fe Mon Sep 17 00:00:00 2001 From: Spitfire Date: Tue, 21 May 2024 15:59:53 -0600 Subject: [PATCH 1/2] Fixed copyright notification --- app/Jobs/Copyright/DeleteEntityImage.php | 9 ++++----- .../Campaign/Notifications/ImageRemoveService.php | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Jobs/Copyright/DeleteEntityImage.php b/app/Jobs/Copyright/DeleteEntityImage.php index 29d895b960..61184bc4c9 100644 --- a/app/Jobs/Copyright/DeleteEntityImage.php +++ b/app/Jobs/Copyright/DeleteEntityImage.php @@ -31,11 +31,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 +52,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]), ] ); } From 35384daba04973de44db5865c046f18ba68684e0 Mon Sep 17 00:00:00 2001 From: spitfire305 Date: Tue, 21 May 2024 22:01:17 +0000 Subject: [PATCH 2/2] Fix styling --- app/Jobs/Copyright/DeleteEntityImage.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Jobs/Copyright/DeleteEntityImage.php b/app/Jobs/Copyright/DeleteEntityImage.php index 61184bc4c9..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;