summaryrefslogtreecommitdiffstats
path: root/frontend/api/class.ApiLoginController.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/api/class.ApiLoginController.php')
-rw-r--r--frontend/api/class.ApiLoginController.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/frontend/api/class.ApiLoginController.php b/frontend/api/class.ApiLoginController.php
index d3a0100..222adcf 100644
--- a/frontend/api/class.ApiLoginController.php
+++ b/frontend/api/class.ApiLoginController.php
@@ -22,8 +22,11 @@ class ApiLoginController{
// Preberemo poslane podatke
- //$this->processCall();
- $this->processCallForm();
+ $this->processCall();
+
+ if(empty($this->data)) {
+ $this->processCallForm();
+ }
/*echo 'Params:';
@@ -31,11 +34,10 @@ class ApiLoginController{
echo '<br>Data:';
var_dump($this->data);
echo 'Metoda: '.$this->method;*/
-
-
+
// Izvedemo akcijo
- $login = new ApiLogin();
- $login->executeAction($this->params, $this->data);
+ $login = new ApiLogin();
+ $login->executeAction($this->params, $this->data, $this->method);
}
@@ -51,6 +53,7 @@ class ApiLoginController{
// Preberemo podatke iz post-a
$this->data = json_decode(file_get_contents('php://input'), true);
+
}
// Preberemo poslane podatke (ce posiljamo direktno iz forme)