Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Minik Gaarde Lambrecht
2021-03-26 18:25:39 +01:00
52 changed files with 1577 additions and 167 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ if(isset($_GET['gameJamId'])){
}
header('Content-Type: application/json;charset=UTF-8');
echo $dbValue->toJson(JSON_PRETTY_PRINT);
echo json_encode(array('data' => $dbValue->jsonSerialize()));
//var_dump(headers_list());
@@ -14,6 +14,9 @@ if(isAdmin()){
$gameJam->name = $_POST["gameJamName"];
$gameJam->start_time = $_POST["startDate"]."T".$_POST["startTime"];
$gameJam->end_time = $_POST["endDate"]."T".$_POST["endTime"];
if (!empty($_POST['keyWord'])) {
$gameJam->key_word = $_POST['keyWord'];
}
$gameJam->description = $_POST["description"];
if($gameJam->save()){
@@ -27,4 +30,5 @@ if(isAdmin()){
}
}else{
http_response_code(401);
echo json_encode(["message" => "is not admin"]);
}
@@ -26,10 +26,14 @@ if(isAdmin()){
}else{
http_response_code(500);
}
}else{
http_response_code(400);
echo json_encode(["message" => "game jam not found"]);
}
}else{
http_response_code(400);
}
}else{
http_response_code(401);
echo json_encode(["message" => "is not admin"]);
}