Skip to content

Commit

Permalink
fixed missing image in mail for paid participants
Browse files Browse the repository at this point in the history
  • Loading branch information
Lung committed Feb 11, 2025
1 parent 1891f5c commit 773db0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Command/UpdatePaymentsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use kissj\Logging\Sentry\SentryCollector;
use kissj\Mailer\MailerSettings;
use kissj\Payment\PaymentService;
use Slim\Views\Twig;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -24,6 +25,7 @@ public function __construct(
private readonly EventRepository $eventRepository,
private readonly MailerSettings $mailerSettings,
private readonly SentryCollector $sentryCollector,
private readonly Twig $view,
) {
parent::__construct();
}
Expand All @@ -35,11 +37,14 @@ public function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('Updating payments for ' . count($events) . ' events...');

foreach ($events as $event) {
// deduplicate same code in class EventInfoMiddleware:36
$this->view->getEnvironment()->addGlobal('event', $event); // used in templates
$this->mailerSettings->setEvent($event);
$this->mailerSettings->setFullUrlLink(
// ugly hack, but it is complicated to get RouterCollector in command
sprintf("https://kissj.net/%s", $event->slug), // production address
);

$this->paymentService->updatePayments($event);
}

Expand Down

0 comments on commit 773db0c

Please sign in to comment.