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
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
||||
$admins = $this->admins_model->get_batch($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||
|
||||
$admins = $this->admins_model->get_batch($conditions);
|
||||
|
||||
if ($id !== NULL && count($admins) === 0)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,9 @@ class Categories extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
||||
$categories = $this->services_model->get_all_categories($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||
|
||||
$categories = $this->services_model->get_all_categories($conditions);
|
||||
|
||||
if ($id !== NULL && count($categories) === 0)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,9 @@ class Customers extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
||||
$customers = $this->customers_model->get_batch($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||
|
||||
$customers = $this->customers_model->get_batch($conditions);
|
||||
|
||||
if ($id !== NULL && count($customers) === 0)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,9 @@ class Providers extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
||||
$providers = $this->providers_model->get_batch($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||
|
||||
$providers = $this->providers_model->get_batch($conditions);
|
||||
|
||||
if ($id !== NULL && count($providers) === 0)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,9 @@ class Secretaries extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
||||
$secretaries = $this->secretaries_model->get_batch($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||
|
||||
$secretaries = $this->secretaries_model->get_batch($conditions);
|
||||
|
||||
if ($id !== NULL && count($secretaries) === 0)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,9 @@ class Services extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : NULL;
|
||||
$services = $this->services_model->get_batch($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : NULL;
|
||||
|
||||
$services = $this->services_model->get_batch($conditions);
|
||||
|
||||
if ($id !== NULL && count($services) === 0)
|
||||
{
|
||||
|
|
|
@ -49,8 +49,9 @@ class Unavailabilities extends API_V1_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$condition = $id !== NULL ? ['id' => $id] : 'is_unavailable = 1';
|
||||
$unavailabilities = $this->appointments_model->get_batch($condition);
|
||||
$conditions = $id !== NULL ? ['id' => $id] : ['is_unavailable' => true];
|
||||
|
||||
$unavailabilities = $this->appointments_model->get_batch($conditions);
|
||||
|
||||
if ($id !== NULL && count($unavailabilities) === 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue