Skip to content
Snippets Groups Projects
Commit 74526c45 authored by Haidar's avatar Haidar
Browse files

Merge branch 'main' of...

Merge branch 'main' of https://gitlab.informatika.org/if3110-2023-01-j/if-3110-2023-01-j into Haidar
parents a685fb81 5314092d
Branches
Tags
No related merge requests found
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
session_start(); session_start();
include "../../config/config.php"; // include "../../config/config.php";
include "../../app/models/user.php"; include "../../app/models/user.php";
ini_set('display_errors', 1); // ini_set('display_errors', 1);
$users = new UserModel(); $users = new UserModel();
$params = array(); $params = array();
......
...@@ -235,8 +235,9 @@ function searchUser(filter, sort, input, isAdmin) { ...@@ -235,8 +235,9 @@ function searchUser(filter, sort, input, isAdmin) {
xhr.onload = function () { xhr.onload = function () {
if (xhr.status === 200) { if (xhr.status === 200) {
console.log(this.responseText);
let response = JSON.parse(this.responseText); let response = JSON.parse(this.responseText);
// console.log(this.responseText); //
displayData(response, (parseInt(page) - 1) * 10, isAdmin); displayData(response, (parseInt(page) - 1) * 10, isAdmin);
......
...@@ -22,7 +22,7 @@ document.addEventListener("DOMContentLoaded", function() { ...@@ -22,7 +22,7 @@ document.addEventListener("DOMContentLoaded", function() {
console.log(response); console.log(response);
console.log(response.length) console.log(response.length)
if (response === "success") { if (response === "success") {
window.location.href = "../challenge"; window.location.href = "../challenge/";
} else if (response === "error") { } else if (response === "error") {
alert("Invalid username or password"); alert("Invalid username or password");
} else { } else {
......
...@@ -130,7 +130,7 @@ function registerUser(username, email, password) { ...@@ -130,7 +130,7 @@ function registerUser(username, email, password) {
console.log(response); console.log(response);
if (response == "success") { if (response == "success") {
window.location.href = '../challenge'; window.location.href = '../challenge/';
} else { } else {
alert('Gagal mendaftar akun baru'); alert('Gagal mendaftar akun baru');
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment