From 36640946a15af6643cca2b6478b4e84b46ffef23 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 8 Jun 2021 15:07:04 +0200 Subject: [PATCH] v0.1.3a fix some location error --- Backend/controller/accessControl.php | 2 +- Backend/controller/login.php | 10 +++++----- Backend/controller/logout.php | 2 +- Backend/migrations/runMigration.php | 7 ++++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Backend/controller/accessControl.php b/Backend/controller/accessControl.php index bc96b48..86f5c29 100644 --- a/Backend/controller/accessControl.php +++ b/Backend/controller/accessControl.php @@ -1,6 +1,6 @@ save()) { $_SESSION['token'] = $token; $_SESSION['name'] = $username; - header('location: ../../Frontend/admin.php?login=success'); + header('location: ../../admin.php?login=success'); exit(); http_response_code(200); } else { session_destroy(); http_response_code(500); - header('location: ../../Frontend/login.php?error=couldNotSaveToken'); + header('location: ../../login.php?error=couldNotSaveToken'); } } else { session_destroy(); http_response_code(401); - header('location: ../../Frontend/login.php?message=wrongPassword'); + header('location: ../../login.php?message=wrongPassword'); //echo json_encode(["message" => "Wrong password"]); } } else { session_destroy(); http_response_code(401); - header('location: ../../Frontend/login.php?message=userWasNotFound'); + header('location: ../../login.php?message=userWasNotFound'); //echo json_encode(["message" => "User was not found"]); } } else { http_response_code(400); - header('location: ../../Frontend/login.php?message=badMethod'); + header('location: ../../login.php?message=badMethod'); } diff --git a/Backend/controller/logout.php b/Backend/controller/logout.php index c1df32f..e1adb80 100644 --- a/Backend/controller/logout.php +++ b/Backend/controller/logout.php @@ -2,4 +2,4 @@ session_start(); session_unset(); session_destroy(); -header("location: ../../Frontend/index.php"); +header("location: ../../index.php"); diff --git a/Backend/migrations/runMigration.php b/Backend/migrations/runMigration.php index e8a4d46..cb98efc 100644 --- a/Backend/migrations/runMigration.php +++ b/Backend/migrations/runMigration.php @@ -1,6 +1,7 @@