Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
@@ -15,4 +15,6 @@ if(isset($_GET['gameJamId'])){
|
||||
}
|
||||
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $dbValue->toJson(JSON_PRETTY_PRINT);
|
||||
echo $dbValue->toJson(JSON_PRETTY_PRINT);
|
||||
|
||||
//var_dump(headers_list());
|
||||
@@ -17,18 +17,14 @@ if(isAdmin()){
|
||||
$gameJam->description = $_POST["description"];
|
||||
|
||||
if($gameJam->save()){
|
||||
header("location: ../../../Frontend/Html/AdminPage.html?success=UploadedFile");
|
||||
exit();
|
||||
http_response_code(201);
|
||||
}
|
||||
else{
|
||||
header("location: ../../../Frontend/Html/AdminPage.html?error=FailToSaveGameJam");
|
||||
exit();
|
||||
http_response_code(500);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/Html/AdminPage.html?error=FailedToMakeGameJam");
|
||||
exit();
|
||||
http_response_code(400);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/index.html?error=NotAdmin");
|
||||
exit();
|
||||
http_response_code(401);
|
||||
}
|
||||
@@ -22,16 +22,14 @@ if(isAdmin()){
|
||||
|
||||
$gameJam->description = $_POST['description'];
|
||||
if ($gameJam->save()) {
|
||||
header("location: ../../../Frontend/Html/AdminPage.html?success=UpdatedFile");
|
||||
exit();
|
||||
http_response_code(201);
|
||||
}else{
|
||||
http_response_code(500);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/Html/AdminPage.html?error=FailedToUpdatedGameJam");
|
||||
exit();
|
||||
http_response_code(400);
|
||||
}
|
||||
|
||||
}else{
|
||||
header("location: ../../../Frontend/index.html?error=NotAdmin");
|
||||
exit();
|
||||
http_response_code(401);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user