From 7c5f5bc4cfd8dc64f6f36dc0e47a30921aec8abd Mon Sep 17 00:00:00 2001 From: Pierre POMES Date: Fri, 14 Jun 2024 14:44:35 -0400 Subject: [PATCH] Dashboard Api Controller: call UpdateComponentCommand only with modified params --- .../Controllers/Dashboard/ApiController.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/Dashboard/ApiController.php b/app/Http/Controllers/Dashboard/ApiController.php index 4e59a7a40c1..e261c99f21a 100644 --- a/app/Http/Controllers/Dashboard/ApiController.php +++ b/app/Http/Controllers/Dashboard/ApiController.php @@ -38,15 +38,15 @@ public function postUpdateComponent(Component $component) try { execute(new UpdateComponentCommand( $component, - $component->name, - $component->description, + null, + null, Binput::get('status'), - $component->link, - $component->order, - $component->group_id, - $component->enabled, - $component->meta, - $component->tags, + null, + null, + null, + null, + null, + null, true // Silent mode )); } catch (QueryException $e) { @@ -71,15 +71,15 @@ public function postUpdateComponentOrder() execute(new UpdateComponentCommand( $component, - $component->name, - $component->description, + null, + null, $component->status, - $component->link, + null, $order + 1, - $component->group_id, - $component->enabled, - $component->meta, - $component->tags, + null, + null, + null, + null, true // Silent mode )); } catch (QueryException $e) {