Fix command dispatching
This commit is contained in:
@@ -116,7 +116,7 @@ class CreateIncidentCommandHandler
|
||||
|
||||
// Update the component.
|
||||
if ($component = Component::find($command->component_id)) {
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
Component::find($command->component_id),
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -88,7 +88,7 @@ class UpdateIncidentCommandHandler
|
||||
|
||||
// Update the component.
|
||||
if ($component = Component::find($command->component_id)) {
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
Component::find($command->component_id),
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -63,7 +63,7 @@ class CreateIncidentUpdateCommandHandler
|
||||
$update = IncidentUpdate::create($data);
|
||||
|
||||
// Update the original incident with the new status.
|
||||
dispatch(new UpdateIncidentCommand(
|
||||
execute(new UpdateIncidentCommand(
|
||||
$command->incident,
|
||||
null,
|
||||
$command->status,
|
||||
|
||||
@@ -58,7 +58,7 @@ class SubscribeSubscriberCommandHandler
|
||||
});
|
||||
|
||||
if ($command->verified) {
|
||||
dispatch(new VerifySubscriberCommand($subscriber));
|
||||
execute(new VerifySubscriberCommand($subscriber));
|
||||
} else {
|
||||
$subscriber->notify(new VerifySubscriptionNotification());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user