diff --git a/api/exercise/submit.php b/api/exercise/submit.php index d38872b53950467b7844308ebe1aa003191dd382..c8a2147c0a4f7a16ea84ce360350221b9caae3e6 100644 --- a/api/exercise/submit.php +++ b/api/exercise/submit.php @@ -18,7 +18,7 @@ function submitQuiz($exerciseId, $exerciseName, $selectedOptions, $userId, $isDo } $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "http://express:5000/exercise/result/" . $exerciseId . "?apiKey=" . getenv('REST_API_KEY')); + curl_setopt($ch, CURLOPT_URL, "http://express:5000/exercise/result/" . $exerciseId); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt( diff --git a/api/merch/buy.php b/api/merch/buy.php index 5ba939a42b88e1701ed4c33e129982528411ee96..b66f5e98cfef035e27dc667e8d309e1b7c8f65ef 100644 --- a/api/merch/buy.php +++ b/api/merch/buy.php @@ -3,7 +3,7 @@ function buyItem($merchId, $userId, $email) { // rest buy merchandise $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "http://express:5000/merch/buy/" . $merchId . "?apiKey=" . getenv('REST_API_KEY')); + curl_setopt($ch, CURLOPT_URL, "http://express:5000/merch/buy/" . $merchId); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt( diff --git a/api/merch/redeem.php b/api/merch/redeem.php index 3c61ea32661ff40807c050f6edc325634e2e77f9..c73962f92efdea48d90e64725939f4569f484abe 100644 --- a/api/merch/redeem.php +++ b/api/merch/redeem.php @@ -1,9 +1,9 @@ <?php function redeem($voucher, $userId) { - // rest buy merchandise + // rest redeem $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "http://express:5000/voucher/use/" . $voucher . "?apiKey=" . getenv('REST_API_KEY')); + curl_setopt($ch, CURLOPT_URL, "http://express:5000/voucher/use/" . $voucher); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt( diff --git a/app/views/confirmation/index.php b/app/views/confirmation/index.php index 902c1d313f8c3dbede47eca93c47c12266f3e554..8cf8ac8da88ec0cff2a33fcb58a7d8a0f7cf7045 100644 --- a/app/views/confirmation/index.php +++ b/app/views/confirmation/index.php @@ -11,7 +11,7 @@ <? endif; ?> <div class="conf-items"> <div class="merch-item" - style="background-image: url('http://172.20.10.2:5000/image/?filename=<?= $data['merch']['image'] ?>');"> + style="background-image: url('http://localhost:5000/image/?filename=<?= $data['merch']['image'] ?>&apiKey=ax5kBNUxP2Cr0l8dwR472lMOiPeyJLRY7mKbTw0Cc8Z3hVW2kYmtAFcTNctI9139hHWUbJ5q3U8mRlZopXhFd9sTleg4lPr0DQkeMg3ntQZZFaTrASrWbc5QZ4CDIlPO');"> <div class="merch-image"></div> <div class="merch-details"> <div class="merch-name"> diff --git a/app/views/merchandise/index.php b/app/views/merchandise/index.php index 519a3463a096f67ea35c84324aaec232db5e01da..ee351e909ddedd0cbc461f3b4df311dfeb99bd55 100644 --- a/app/views/merchandise/index.php +++ b/app/views/merchandise/index.php @@ -31,7 +31,7 @@ <div class="merchandise-items"> <? foreach ($data['merch'] as $merch): ?> <div class="merch-item" - style="background-image: url('http://172.20.10.2:5000/image/?filename=<?= $merch['image'] ?>');"> + style="background-image: url('http://localhost:5000/image/?filename=<?= $merch['image'] ?>&apiKey=ax5kBNUxP2Cr0l8dwR472lMOiPeyJLRY7mKbTw0Cc8Z3hVW2kYmtAFcTNctI9139hHWUbJ5q3U8mRlZopXhFd9sTleg4lPr0DQkeMg3ntQZZFaTrASrWbc5QZ4CDIlPO');"> <div class="merch-image"></div> <div class="merch-details"> <div class="merch-name">