Skip to content

Commit

Permalink
don't resolve in the constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 21, 2023
1 parent 54612d6 commit 517e680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Api/Controller/UpdateReactionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@

class UpdateReactionController extends AbstractShowController
{
/**
* {@inheritdoc}
*/
public $serializer = ReactionSerializer::class;

/**
* @var Dispatcher
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Listener/SaveReactionsToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function __construct(SettingsRepositoryInterface $settings, TranslatorInt
$this->translator = $translator;
$this->extensions = $extensions;
$this->events = $events;
$this->request = resolve('fof-reactions.request');
}

/**
Expand All @@ -76,6 +75,8 @@ public function handle(Saving $event)
$post = $event->post;
$data = $event->data;

$this->request = resolve('fof-reactions.request');

if ($post->exists && Arr::has($data, 'attributes.reaction')) {
$actor = $event->actor;

Expand Down

0 comments on commit 517e680

Please sign in to comment.