Fix command dispatching
This commit is contained in:
@@ -71,7 +71,7 @@ class MetricController extends Controller
|
||||
$metricData = Binput::get('metric');
|
||||
|
||||
try {
|
||||
dispatch(new CreateMetricCommand(
|
||||
execute(new CreateMetricCommand(
|
||||
$metricData['name'],
|
||||
$metricData['suffix'],
|
||||
$metricData['description'],
|
||||
@@ -115,7 +115,7 @@ class MetricController extends Controller
|
||||
*/
|
||||
public function deleteMetricAction(Metric $metric)
|
||||
{
|
||||
dispatch(new RemoveMetricCommand($metric));
|
||||
execute(new RemoveMetricCommand($metric));
|
||||
|
||||
return cachet_redirect('dashboard.metrics')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.metrics.delete.success')));
|
||||
@@ -146,7 +146,7 @@ class MetricController extends Controller
|
||||
public function editMetricAction(Metric $metric)
|
||||
{
|
||||
try {
|
||||
dispatch(new UpdateMetricCommand(
|
||||
execute(new UpdateMetricCommand(
|
||||
$metric,
|
||||
Binput::get('name', null, false),
|
||||
Binput::get('suffix', null, false),
|
||||
|
||||
Reference in New Issue
Block a user