only allow actions (admin) when in right state; prepare decline reason

- fixes on path's and varnames
This commit is contained in:
2018-02-23 17:43:08 +01:00
parent e88eb13d91
commit e38d201ec1
6 changed files with 57 additions and 41 deletions

View File

@@ -36,7 +36,7 @@ function exec_curl_request($handle)
if ($http_code == 401) {
throw new Exception('Invalid access token provided');
}
return false;
throw new Exception("Server responds: '" . $response['error'] . "'");
} else {
$response = json_decode($response, true);
if (isset($response["event_id"])) {