mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Added ability to log all external API calls by setting user.debug = 1
This commit is contained in:
parent
ac121dcb74
commit
786b958086
@ -53,6 +53,11 @@ class external_api extends cora\api {
|
||||
* @return string Result on success, false on failure.
|
||||
*/
|
||||
protected function curl($arguments) {
|
||||
$user = $this->api('user', 'get', $this->session->get_user_id());
|
||||
if ($user['debug'] === true) {
|
||||
$this::$log_mysql = 'all';
|
||||
}
|
||||
|
||||
$this->request_timestamp = time();
|
||||
$this->request_timestamp_microtime = $this->microtime();
|
||||
|
||||
@ -61,7 +66,6 @@ class external_api extends cora\api {
|
||||
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($curl_handle, CURLOPT_TIMEOUT, 60);
|
||||
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
|
||||
// curl_setopt($curl_handle, CURLOPT_HEADER, true);
|
||||
|
||||
if(isset($arguments['method']) === true && $arguments['method'] === 'POST') {
|
||||
curl_setopt($curl_handle, CURLOPT_POST, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user