mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Renamed variables in API controllers
This commit is contained in:
parent
3dca937728
commit
033719e9b4
7 changed files with 21 additions and 14 deletions
|
@ -49,8 +49,9 @@ class Admins extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||||
$admins = $this->admins_model->get_batch($condition);
|
|
||||||
|
$admins = $this->admins_model->get_batch($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($admins) === 0)
|
if ($id !== NULL && count($admins) === 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Categories extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||||
$categories = $this->services_model->get_all_categories($condition);
|
|
||||||
|
$categories = $this->services_model->get_all_categories($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($categories) === 0)
|
if ($id !== NULL && count($categories) === 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Customers extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||||
$customers = $this->customers_model->get_batch($condition);
|
|
||||||
|
$customers = $this->customers_model->get_batch($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($customers) === 0)
|
if ($id !== NULL && count($customers) === 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Providers extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||||
$providers = $this->providers_model->get_batch($condition);
|
|
||||||
|
$providers = $this->providers_model->get_batch($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($providers) === 0)
|
if ($id !== NULL && count($providers) === 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Secretaries extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||||
$secretaries = $this->secretaries_model->get_batch($condition);
|
|
||||||
|
$secretaries = $this->secretaries_model->get_batch($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($secretaries) === 0)
|
if ($id !== NULL && count($secretaries) === 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Services extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||||
$services = $this->services_model->get_batch($condition);
|
|
||||||
|
$services = $this->services_model->get_batch($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($services) === 0)
|
if ($id !== NULL && count($services) === 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,8 +49,9 @@ class Unavailabilities extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$condition = $id !== NULL ? ['id' => $id] : 'is_unavailable = 1';
|
$conditions = $id !== NULL ? ['id' => $id] : ['is_unavailable' => true];
|
||||||
$unavailabilities = $this->appointments_model->get_batch($condition);
|
|
||||||
|
$unavailabilities = $this->appointments_model->get_batch($conditions);
|
||||||
|
|
||||||
if ($id !== NULL && count($unavailabilities) === 0)
|
if ($id !== NULL && count($unavailabilities) === 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue