Skip to content

Commit

Permalink
Merge pull request #879 from owlchester/copyright-notification-fix
Browse files Browse the repository at this point in the history
Fixed copyright notification
  • Loading branch information
ilestis authored May 21, 2024
2 parents 555b865 + 35384da commit 70840b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions app/Jobs/Copyright/DeleteEntityImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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'];
}

/**
Expand All @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion app/Services/Campaign/Notifications/ImageRemoveService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
]
);
}
Expand Down

0 comments on commit 70840b6

Please sign in to comment.