Fix command dispatching
This commit is contained in:
@@ -48,7 +48,7 @@ class MetricPointController extends AbstractApiController
|
||||
public function store(Metric $metric)
|
||||
{
|
||||
try {
|
||||
$metricPoint = dispatch(new CreateMetricPointCommand(
|
||||
$metricPoint = execute(new CreateMetricPointCommand(
|
||||
$metric,
|
||||
Binput::get('value'),
|
||||
Binput::get('timestamp')
|
||||
@@ -70,7 +70,7 @@ class MetricPointController extends AbstractApiController
|
||||
*/
|
||||
public function update(Metric $metric, MetricPoint $metricPoint)
|
||||
{
|
||||
$metricPoint = dispatch(new UpdateMetricPointCommand(
|
||||
$metricPoint = execute(new UpdateMetricPointCommand(
|
||||
$metricPoint,
|
||||
$metric,
|
||||
Binput::get('value'),
|
||||
@@ -90,7 +90,7 @@ class MetricPointController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Metric $metric, MetricPoint $metricPoint)
|
||||
{
|
||||
dispatch(new RemoveMetricPointCommand($metricPoint));
|
||||
execute(new RemoveMetricPointCommand($metricPoint));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user