fix unlimited flags when adding customer; add debug flag to log all api-requests for testing purposes now

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-02-16 14:34:55 +01:00
parent 8978dd3a4b
commit 60defd3cdf
2 changed files with 73 additions and 68 deletions

View File

@@ -3,6 +3,8 @@
abstract class ApiCommand
{
private $debug = true;
private $is_admin = false;
private $user_data = null;
@@ -27,6 +29,9 @@ abstract class ApiCommand
throw new Exception("Invalid user data", 500);
}
$this->logger = FroxlorLogger::getInstanceOf($this->user_data);
if ($this->debug) {
$this->logger()->logAction(LOG_ERROR, LOG_DEBUG, json_encode($params, JSON_UNESCAPED_SLASHES));
}
$this->initLang();
$this->initMail();