Added http response code
This commit is contained in:
@@ -10,17 +10,17 @@ if(isLogin()){
|
||||
$group->group_name = $_POST['groupName'];
|
||||
$group->group_amount = $_POST['groupAmount'];
|
||||
$group->game_jam_id = $_POST['gameJamId'];
|
||||
$group->save();
|
||||
header("location: ../../../Frontend/index.html?success=YouHaveUpdated");
|
||||
exit();
|
||||
if(!$group->save()){
|
||||
http_response_code(500);
|
||||
}else{
|
||||
http_response_code(201);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/index.html?error=CouldNotUpdate");
|
||||
exit();
|
||||
http_response_code(400);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/index.html?error=NotLogin");
|
||||
exit();
|
||||
http_response_code(401);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user