diff --git a/api/search/search.php b/api/search/search.php index 79f1df4735675bf9dd79902c2e353773c346c9e5..2d0a2e54732b3fa9f3ed59b667ceb160d2e1c8a9 100644 --- a/api/search/search.php +++ b/api/search/search.php @@ -2,10 +2,10 @@ session_start(); -include "../../config/config.php"; +// include "../../config/config.php"; include "../../app/models/user.php"; -ini_set('display_errors', 1); +// ini_set('display_errors', 1); $users = new UserModel(); $params = array(); diff --git a/public/js/Hall-of-Fame.js b/public/js/Hall-of-Fame.js index 5b10e6d09246175947c7442e55d555492c8fcb95..5740e2f2a2eba1e0ae7ec53e911dbba38a533cb6 100644 --- a/public/js/Hall-of-Fame.js +++ b/public/js/Hall-of-Fame.js @@ -235,8 +235,9 @@ function searchUser(filter, sort, input, isAdmin) { xhr.onload = function () { if (xhr.status === 200) { + console.log(this.responseText); let response = JSON.parse(this.responseText); - // console.log(this.responseText); + // displayData(response, (parseInt(page) - 1) * 10, isAdmin); diff --git a/public/js/login.js b/public/js/login.js index fa55e41a9077d53932a8babc62e29067bd66be2f..8c75c28f704aa4896e4873539336bfd365916a26 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -22,7 +22,7 @@ document.addEventListener("DOMContentLoaded", function() { console.log(response); console.log(response.length) if (response === "success") { - window.location.href = "../challenge"; + window.location.href = "../challenge/"; } else if (response === "error") { alert("Invalid username or password"); } else { diff --git a/public/js/register.js b/public/js/register.js index ad323d71784db48f66676076edc870e336429d8d..b9786ae735ee5f1b61eeb6ef85f2287eb3c1ba06 100644 --- a/public/js/register.js +++ b/public/js/register.js @@ -130,7 +130,7 @@ function registerUser(username, email, password) { console.log(response); if (response == "success") { - window.location.href = '../challenge'; + window.location.href = '../challenge/'; } else { alert('Gagal mendaftar akun baru'); }