Added http response code
This commit is contained in:
@@ -36,14 +36,15 @@ if(isLogin()){
|
||||
$gameData->img = imagesFileHandler($thumbnailFileName,$thumbnailFileTmp);
|
||||
}
|
||||
$gameData->is_web_Based = $isWebBased;
|
||||
$gameData->save();
|
||||
header("location: ../../../Frontend/index.html?success=UpdatedFiles");
|
||||
exit();
|
||||
if(!$gameData->save()){
|
||||
http_response_code(500);
|
||||
}else{
|
||||
http_response_code(201);
|
||||
}
|
||||
|
||||
}else{
|
||||
header("location: ../../../Frontend/index.html?error=FailedUpload");
|
||||
exit();
|
||||
http_response_code(400);
|
||||
}
|
||||
}else{
|
||||
header("location: ../../../Frontend/index.html?error=NoLogin");
|
||||
exit();
|
||||
http_response_code(401);
|
||||
}
|
||||
Reference in New Issue
Block a user