Commit a1e44cc6 authored by Ad Schellevis's avatar Ad Schellevis

style fix

parent 2a60c252
...@@ -30,6 +30,7 @@ namespace OPNsense\Base; ...@@ -30,6 +30,7 @@ namespace OPNsense\Base;
use OPNsense\Core\ACL; use OPNsense\Core\ACL;
use OPNsense\Auth\AuthenticationFactory; use OPNsense\Auth\AuthenticationFactory;
/** /**
* Class ApiControllerBase, inherit this class to implement API calls * Class ApiControllerBase, inherit this class to implement API calls
* @package OPNsense\Base * @package OPNsense\Base
...@@ -111,8 +112,7 @@ class ApiControllerBase extends ControllerRoot ...@@ -111,8 +112,7 @@ class ApiControllerBase extends ControllerRoot
if (!$acl->isPageAccessible($authResult['username'], $_SERVER['REQUEST_URI'])) { if (!$acl->isPageAccessible($authResult['username'], $_SERVER['REQUEST_URI'])) {
$this->getLogger()->error("uri ".$_SERVER['REQUEST_URI']. $this->getLogger()->error("uri ".$_SERVER['REQUEST_URI'].
" not accessible for user ".$authResult['username'] . " using api key ". " not accessible for user ".$authResult['username'] . " using api key ".
$apiKey $apiKey);
);
} else { } else {
// authentication + authorization successful. // authentication + authorization successful.
// pre validate request and communicate back to the user on errors // pre validate request and communicate back to the user on errors
...@@ -134,8 +134,8 @@ class ApiControllerBase extends ControllerRoot ...@@ -134,8 +134,8 @@ class ApiControllerBase extends ControllerRoot
$this->response->setContentType('application/json', 'UTF-8'); $this->response->setContentType('application/json', 'UTF-8');
$this->response->setJsonContent( $this->response->setJsonContent(
array('message' => $dispatchError, array('message' => $dispatchError,
'status' => 400 'status' => 400)
)); );
$this->response->send(); $this->response->send();
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment