Added http response code
This commit is contained in:
@@ -52,23 +52,24 @@ if(isLogin()){
|
||||
$gameData->is_web_Based = $isWebBased;
|
||||
$gameData->save();
|
||||
$group->gameData()->associate($gameData);
|
||||
$group->save();
|
||||
header("location: ../../../Frontend/index.html?success=UploadedFile");
|
||||
exit();
|
||||
if(! $group->save()){
|
||||
http_response_code(500);
|
||||
}else{
|
||||
http_response_code(201);
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/group.php?error=UploadFail");
|
||||
exit();
|
||||
http_response_code(400);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/group.php?error=TooManyUploads");
|
||||
exit();
|
||||
echo "Can only upload one file";
|
||||
http_response_code(400);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/group.php?error=GameJamHasNotBegun");
|
||||
exit();
|
||||
echo "Can only upload when the game jam has started";
|
||||
http_response_code(400);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Main.php?error=NoLogin");
|
||||
exit();
|
||||
http_response_code(401);
|
||||
}
|
||||
Reference in New Issue
Block a user