Removed the delete_unavailable method

This commit is contained in:
Alex Tselegidis 2021-10-29 13:11:56 +02:00
parent 8b02cbb369
commit e29c2198de
3 changed files with 3 additions and 15 deletions

View file

@ -556,7 +556,7 @@ class Backend_api extends EA_Controller {
$provider = $this->providers_model->find($unavailable['id_users_provider']);
$this->appointments_model->delete_unavailable($unavailable['id']);
$this->appointments_model->delete($unavailable['id']);
// Google Sync
try

View file

@ -137,7 +137,7 @@ class Unavailabilities extends API_V1_Controller {
}
catch (Throwable $e)
{
$this->handle_exception($exception);
$this->handle_exception($e);
}
}
@ -150,7 +150,7 @@ class Unavailabilities extends API_V1_Controller {
{
try
{
$result = $this->appointments_model->delete_unavailable($id);
$result = $this->appointments_model->delete($id);
$response = new Response([
'code' => 200,

View file

@ -352,18 +352,6 @@ class Appointments_model extends EA_Model {
}
}
/**
* Remove an existing unavailable from the database.
*
* @param int $unavailable_id Record id to be deleted.
*
* @return bool Returns the delete operation result.
*/
public function delete_unavailable(int $unavailable_id): bool
{
return $this->db->delete('appointments', ['id' => $unavailable_id]);
}
/**
* Remove all the Google Calendar event IDs from appointment records.
*