The Appointments API endpoint must only return appointment records and no unavailabilities.
This commit is contained in:
parent
7ee9f24f5a
commit
baa2e58951
1 changed files with 10 additions and 2 deletions
|
@ -50,8 +50,16 @@ class Appointments extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? 'id = ' . $id : NULL;
|
$conditions = [
|
||||||
$appointments = $this->appointments_model->get_batch($condition, array_key_exists('aggregates', $_GET));
|
'is_unavailable' => FALSE
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($id !== NULL)
|
||||||
|
{
|
||||||
|
$conditions['id'] = $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$appointments = $this->appointments_model->get_batch($conditions, array_key_exists('aggregates', $_GET));
|
||||||
|
|
||||||
if ($id !== NULL && count($appointments) === 0)
|
if ($id !== NULL && count($appointments) === 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue