diff options
-rw-r--r-- | endpoint.php | 1 | ||||
-rw-r--r-- | main.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/endpoint.php b/endpoint.php index a58eeb5..7bfe495 100644 --- a/endpoint.php +++ b/endpoint.php @@ -1,6 +1,7 @@ <?php error_reporting(0); header("Content-Type: application/json"); + header("Access-Control-Allow-Origin: *"); require "main.php"; $g = new gimsisextClient(); $g->setusername($_REQUEST['u']); @@ -338,7 +338,7 @@ Errors: $postbody = '{ "aPodatki": "'.base64_encode($podatki).'" }'; curl_setopt($ch, CURLOPT_POSTFIELDS, $postbody); $setprofil_output = curl_exec($ch); - if(json_decode($setprofil_output)['d']['success'] == true) { + if(json_decode($setprofil_output, true)['d']['success'] == true) { return true; } else { return false; |