fixup! RVRNEXT-11 add controller for events
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good

This commit is contained in:
Bence Pőcze 2023-05-28 16:42:18 +02:00
parent b103575a8f
commit 894239bddf
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -98,7 +98,7 @@ class EventController implements IAuthenticationRequired, ISecured
]);
}
public function getEvent(): IContent
public function getEvent(): ?IContent
{
$event = $this->eventRepository->getBySlug(Container::$request->query('eventSlug'));
if (!$event) {
@ -166,7 +166,7 @@ class EventController implements IAuthenticationRequired, ISecured
return new JsonContent(['success' => true]);
}
private function sumTransactions(Event $event): int
private function sumTransactions(Event $event): float
{
$exchangeRateCalculator = new ExchangeRateCalculator($this->community->getMainCurrency());
$transactions = $this->transactionRepository->getAllByEvent($event, true, ['currency']);