Skip to content

Commit

Permalink
IBX-2367: Dropped sendDeliveryFeedback from RecommendationController (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk authored Feb 18, 2022
1 parent 8e44b7b commit b9f4b72
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/bundle/Controller/RecommendationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

use EzSystems\EzRecommendationClient\Config\CredentialsResolverInterface;
use EzSystems\EzRecommendationClient\Event\RecommendationResponseEvent;
use EzSystems\EzRecommendationClient\Request\BasicRecommendationRequest;
use EzSystems\EzRecommendationClient\Service\RecommendationServiceInterface;
use Ramsey\Uuid\Uuid;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
Expand All @@ -25,26 +23,18 @@ class RecommendationController
/** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */
private $eventDispatcher;

/** @var \EzSystems\EzRecommendationClient\Service\RecommendationServiceInterface */
private $recommendationService;

/** @var \EzSystems\EzRecommendationClient\Config\CredentialsResolverInterface */
private $credentialsResolver;

/** @var \Twig\Environment */
private $twig;

/** @var bool */
private $sendDeliveryFeedback = true;

public function __construct(
EventDispatcherInterface $eventDispatcher,
RecommendationServiceInterface $recommendationService,
CredentialsResolverInterface $credentialsResolver,
Environment $twig
) {
$this->eventDispatcher = $eventDispatcher;
$this->recommendationService = $recommendationService;
$this->credentialsResolver = $credentialsResolver;
$this->twig = $twig;
}
Expand All @@ -70,10 +60,6 @@ public function showRecommendationsAction(Request $request): Response
$response = new Response();
$response->setPrivate();

if ($this->sendDeliveryFeedback) {
$this->recommendationService->sendDeliveryFeedback($request->get(BasicRecommendationRequest::OUTPUT_TYPE_ID_KEY));
}

return $response->setContent(
$this->twig()->render($template, [
'recommendations' => $event->getRecommendationItems(),
Expand All @@ -82,11 +68,6 @@ public function showRecommendationsAction(Request $request): Response
);
}

public function sendDeliveryFeedback(bool $value): void
{
$this->sendDeliveryFeedback = $value;
}

protected function twig(): Environment
{
return $this->twig;
Expand Down

0 comments on commit b9f4b72

Please sign in to comment.