v0.0.9c Small changes
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
require "../../bootstrap.php";
|
||||
|
||||
use Backend\Model\Post;
|
||||
|
||||
if(isset($_GET['id'])){
|
||||
$id = $_GET['id'];
|
||||
$post = Post::query()->find($id);
|
||||
}
|
||||
@@ -5,7 +5,6 @@ use Backend\Model\Post;
|
||||
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
|
||||
//Home.php
|
||||
$data = Post::all();
|
||||
echo $data;
|
||||
|
||||
|
||||
@@ -24,19 +24,23 @@ if (isset($_POST['loginsubmit'])) {
|
||||
} else {
|
||||
session_destroy();
|
||||
http_response_code(500);
|
||||
header('location: ../../Frontend/login.php?error=couldNotSaveToken');
|
||||
}
|
||||
|
||||
} else {
|
||||
session_destroy();
|
||||
http_response_code(401);
|
||||
echo json_encode(["message" => "Wrong password"]);
|
||||
header('location: ../../Frontend/login.php?message=wrongPassword');
|
||||
//echo json_encode(["message" => "Wrong password"]);
|
||||
}
|
||||
|
||||
} else {
|
||||
session_destroy();
|
||||
http_response_code(401);
|
||||
echo json_encode(["message" => "User was not found"]);
|
||||
header('location: ../../Frontend/login.php?message=userWasNotFound');
|
||||
//echo json_encode(["message" => "User was not found"]);
|
||||
}
|
||||
} else {
|
||||
http_response_code(400);
|
||||
header('location: ../../Frontend/login.php?message=badMethod');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user