From 3acf37b497f9ef2499decaa3c1339a88f2ff7d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 Jan 2020 16:52:31 +0100 Subject: cors --- endpoint.php | 1 + main.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/endpoint.php b/endpoint.php index a58eeb5..7bfe495 100644 --- a/endpoint.php +++ b/endpoint.php @@ -1,6 +1,7 @@ setusername($_REQUEST['u']); diff --git a/main.php b/main.php index b04d73c..54ef9b4 100644 --- a/main.php +++ b/main.php @@ -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; -- cgit v1.2.3