diff --git a/application/controllers/api/v1/Appointments.php b/application/controllers/api/v1/Appointments.php index ccf23fdb..df0efc49 100644 --- a/application/controllers/api/v1/Appointments.php +++ b/application/controllers/api/v1/Appointments.php @@ -207,9 +207,13 @@ class Appointments extends API_V1_Controller { try { $appointment = $this->appointments_model->find($id); + $service = $this->services_model->find($appointment['id_services']); + $provider = $this->providers_model->find($appointment['id_users_provider']); + $customer = $this->customers_model->find($appointment['id_users_customer']); + $settings = [ 'company_name' => setting('company_name'), 'company_email' => setting('company_email'), @@ -221,6 +225,7 @@ class Appointments extends API_V1_Controller { $this->appointments_model->delete($id); $this->synchronization->sync_appointment_deleted($appointment, $provider); + $this->notifications->notify_appointment_deleted($appointment, $service, $provider, $customer, $settings); $response = new Response([ diff --git a/application/controllers/api/v1/Categories.php b/application/controllers/api/v1/Categories.php index 284adef9..1c2bfdb2 100644 --- a/application/controllers/api/v1/Categories.php +++ b/application/controllers/api/v1/Categories.php @@ -150,7 +150,7 @@ class Categories extends API_V1_Controller { { try { - $result = $this->services_model->delete_category($id); + $this->services_model->delete_category($id); $response = new Response([ 'code' => 200, diff --git a/application/controllers/api/v1/Customers.php b/application/controllers/api/v1/Customers.php index 76a53656..71c1322f 100644 --- a/application/controllers/api/v1/Customers.php +++ b/application/controllers/api/v1/Customers.php @@ -150,7 +150,7 @@ class Customers extends API_V1_Controller { { try { - $result = $this->customers_model->delete($id); + $this->customers_model->delete($id); $response = new Response([ 'code' => 200, diff --git a/application/controllers/api/v1/Providers.php b/application/controllers/api/v1/Providers.php index 5320310e..cb8177fd 100644 --- a/application/controllers/api/v1/Providers.php +++ b/application/controllers/api/v1/Providers.php @@ -165,7 +165,7 @@ class Providers extends API_V1_Controller { { try { - $result = $this->providers_model->delete($id); + $this->providers_model->delete($id); $response = new Response([ 'code' => 200, diff --git a/application/controllers/api/v1/Secretaries.php b/application/controllers/api/v1/Secretaries.php index 91f13565..0de27b2d 100644 --- a/application/controllers/api/v1/Secretaries.php +++ b/application/controllers/api/v1/Secretaries.php @@ -160,7 +160,7 @@ class Secretaries extends API_V1_Controller { { try { - $result = $this->secretaries_model->delete($id); + $this->secretaries_model->delete($id); $response = new Response([ 'code' => 200, diff --git a/application/controllers/api/v1/Services.php b/application/controllers/api/v1/Services.php index 639a415c..82793129 100644 --- a/application/controllers/api/v1/Services.php +++ b/application/controllers/api/v1/Services.php @@ -150,7 +150,7 @@ class Services extends API_V1_Controller { { try { - $result = $this->services_model->delete($id); + $this->services_model->delete($id); $response = new Response([ 'code' => 200, diff --git a/application/controllers/api/v1/Unavailabilities.php b/application/controllers/api/v1/Unavailabilities.php index 377533f5..a0c9965d 100644 --- a/application/controllers/api/v1/Unavailabilities.php +++ b/application/controllers/api/v1/Unavailabilities.php @@ -150,7 +150,7 @@ class Unavailabilities extends API_V1_Controller { { try { - $result = $this->appointments_model->delete($id); + $this->appointments_model->delete($id); $response = new Response([ 'code' => 200,