Fix command dispatching

This commit is contained in:
James Brooks
2018-06-25 22:25:54 +01:00
parent dd6bbce517
commit 8bb8ee3dc7
30 changed files with 88 additions and 73 deletions

View File

@@ -87,7 +87,7 @@ class ComponentGroupController extends Controller
*/
public function deleteComponentGroupAction(ComponentGroup $group)
{
dispatch(new RemoveComponentGroupCommand($group));
execute(new RemoveComponentGroupCommand($group));
return cachet_redirect('dashboard.components.groups')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));
@@ -126,7 +126,7 @@ class ComponentGroupController extends Controller
public function postAddComponentGroup()
{
try {
$group = dispatch(new CreateComponentGroupCommand(
$group = execute(new CreateComponentGroupCommand(
Binput::get('name'),
Binput::get('order', 0),
Binput::get('collapsed'),
@@ -153,7 +153,7 @@ class ComponentGroupController extends Controller
public function updateComponentGroupAction(ComponentGroup $group)
{
try {
$group = dispatch(new UpdateComponentGroupCommand(
$group = execute(new UpdateComponentGroupCommand(
$group,
Binput::get('name'),
$group->order,