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)