|
|
@ -16,13 +16,12 @@ function handle404() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function before() {
|
|
|
|
function before() {
|
|
|
|
assertApiIsEnabled();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$internalUse = \BusinessLogic\Helpers::getHeader('X-INTERNAL-CALL');
|
|
|
|
$internalUse = \BusinessLogic\Helpers::getHeader('X-INTERNAL-CALL');
|
|
|
|
|
|
|
|
|
|
|
|
if ($internalUse === 'true') {
|
|
|
|
if ($internalUse === 'true') {
|
|
|
|
buildUserContextFromSession();
|
|
|
|
buildUserContextFromSession();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
assertApiIsEnabled();
|
|
|
|
$token = \BusinessLogic\Helpers::getHeader('X-AUTH-TOKEN');
|
|
|
|
$token = \BusinessLogic\Helpers::getHeader('X-AUTH-TOKEN');
|
|
|
|
buildUserContext($token);
|
|
|
|
buildUserContext($token);
|
|
|
|
}
|
|
|
|
}
|
|
|
|