From 7eb048e1d22b82d7ac0b24eb164655425a830916 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 26 Oct 2023 05:12:10 +0200 Subject: [PATCH] Rename webhook related constant --- application/config/constants.php | 4 ++-- application/controllers/Service_categories.php | 6 +++--- application/controllers/Webhooks.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/config/constants.php b/application/config/constants.php index 400a0144..7efb65d2 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -111,8 +111,8 @@ define('WEBHOOK_CUSTOMER_SAVE', 'customer_save'); define('WEBHOOK_CUSTOMER_DELETE', 'customer_delete'); define('WEBHOOK_SERVICE_SAVE', 'service_save'); define('WEBHOOK_SERVICE_DELETE', 'service_delete'); -define('WEBHOOK_CATEGORY_SAVE', 'category_save'); -define('WEBHOOK_CATEGORY_DELETE', 'category_delete'); +define('WEBHOOK_SERVICE_CATEGORY_SAVE', 'service_category_save'); +define('WEBHOOK_SERVICE_CATEGORY_DELETE', 'service_category_delete'); define('WEBHOOK_PROVIDER_SAVE', 'provider_save'); define('WEBHOOK_PROVIDER_DELETE', 'provider_delete'); define('WEBHOOK_SECRETARY_SAVE', 'secretary_save'); diff --git a/application/controllers/Service_categories.php b/application/controllers/Service_categories.php index 9a04f25d..dc8b0a65 100644 --- a/application/controllers/Service_categories.php +++ b/application/controllers/Service_categories.php @@ -129,7 +129,7 @@ class Service_categories extends EA_Controller { $service_category = $this->service_categories_model->find($service_category_id); - $this->webhooks_client->trigger(WEBHOOK_CATEGORY_SAVE, $service_category); + $this->webhooks_client->trigger(WEBHOOK_SERVICE_CATEGORY_SAVE, $service_category); json_response([ 'success' => TRUE, @@ -166,7 +166,7 @@ class Service_categories extends EA_Controller { $service_category = $this->service_categories_model->find($service_category_id); - $this->webhooks_client->trigger(WEBHOOK_CATEGORY_SAVE, $service_category); + $this->webhooks_client->trigger(WEBHOOK_SERVICE_CATEGORY_SAVE, $service_category); json_response([ 'success' => TRUE, @@ -197,7 +197,7 @@ class Service_categories extends EA_Controller { $this->service_categories_model->delete($service_category_id); - $this->webhooks_client->trigger(WEBHOOK_CATEGORY_DELETE, $service_category); + $this->webhooks_client->trigger(WEBHOOK_SERVICE_CATEGORY_DELETE, $service_category); json_response([ 'success' => TRUE, diff --git a/application/controllers/Webhooks.php b/application/controllers/Webhooks.php index 659dabca..e6ffc614 100644 --- a/application/controllers/Webhooks.php +++ b/application/controllers/Webhooks.php @@ -79,8 +79,8 @@ class Webhooks extends EA_Controller { WEBHOOK_CUSTOMER_DELETE, WEBHOOK_SERVICE_SAVE, WEBHOOK_SERVICE_DELETE, - WEBHOOK_CATEGORY_SAVE, - WEBHOOK_CATEGORY_DELETE, + WEBHOOK_SERVICE_CATEGORY_SAVE, + WEBHOOK_SERVICE_CATEGORY_DELETE, WEBHOOK_PROVIDER_SAVE, WEBHOOK_PROVIDER_DELETE, WEBHOOK_SECRETARY_SAVE,