diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index 2331286..1aa03eb 100644 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -928,20 +928,12 @@ class MasterController extends BaseController $number = '91'.$clientData->mobile_no; // Replace with dynamic recipient number if($clientData->whatsapp == 1){ - try { $whatsApp_message = "Dear " . $clientData->name . "," . $businessData->business_name . " has requested your approval for a document. Please click the link below to preview and approve." ; $notificationHelper->sendWhatsAppMessage($number, $whatsApp_message, $url); - } catch (\Exception $e) { - return $this->respond(['Error' => $e->getMessage()]); - } } if($clientData->sms == 1){ - try { $notificationHelper->sendSms(); - } catch (\Exception $e) { - return $this->respond(['Error' => $e->getMessage()]); - } } return $this->respond(['success' => true, 'data' => 'Remember Send Successfully']); @@ -973,21 +965,14 @@ class MasterController extends BaseController if($client_data['whatsapp'] == 1){ - try { - $notificationHelper->sendWhatsAppMessage($number, $message); - return $this->respond(['success' => true, 'otp' => $otp]); - } catch (\Exception $e) { - return $this->respond(['Error' => $e->getMessage()]); - } + $notificationHelper->sendWhatsAppMessage($number, $message); } if($client_data['sms'] == 1){ - try { $notificationHelper->sendSms(); - } catch (\Exception $e) { - return $this->respond(['Error' => $e->getMessage()]); - } } + return $this->respond(['success' => true, 'otp' => $otp]); + } } else { return false; diff --git a/app/Views/share_docs.php b/app/Views/share_docs.php index bf5bc40..0cf5fc8 100644 --- a/app/Views/share_docs.php +++ b/app/Views/share_docs.php @@ -333,13 +333,7 @@