Fix activateWarranty. #591

This commit is contained in:
Korina Cordero 2021-07-15 07:59:32 +00:00
parent e162de9021
commit f067a6ddad

View file

@ -287,7 +287,7 @@ class WarrantyController extends APIController
return new APIResponse(true, 'Warranty checked', $data); 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.'); $this->denyAccessUnlessGranted('mobile_warranty.activate', null, 'No access.');
@ -323,7 +323,9 @@ class WarrantyController extends APIController
$em->flush(); $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) protected function handlePictureUpload($file, $target_dir, $serial, $name)