From f067a6ddadf1d41cc6dafc4896aff4fcdf61aacb Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 15 Jul 2021 07:59:32 +0000 Subject: [PATCH] Fix activateWarranty. #591 --- src/Controller/ResqAPI/WarrantyController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Controller/ResqAPI/WarrantyController.php b/src/Controller/ResqAPI/WarrantyController.php index 4d9d83c8..8198098f 100644 --- a/src/Controller/ResqAPI/WarrantyController.php +++ b/src/Controller/ResqAPI/WarrantyController.php @@ -287,7 +287,7 @@ class WarrantyController extends APIController return new APIResponse(true, 'Warranty checked', $data); } - public function activateWarranty(Request $req, EntityManagerInterface $em) + public function activateWarranty(Request $req, EntityManagerInterface $em, MobileAPIHandler $mah) { $this->denyAccessUnlessGranted('mobile_warranty.activate', null, 'No access.'); @@ -323,7 +323,9 @@ class WarrantyController extends APIController $em->flush(); - return new APIResponse(true, 'Warranty activated'); + $data = $this->generateWarrantyData($warranty); + + return new APIResponse(true, 'Warranty activated', $data); } protected function handlePictureUpload($file, $target_dir, $serial, $name)