get json update
This commit is contained in:
parent
e26fa642ea
commit
4f4931f8dd
|
@ -17,4 +17,4 @@ if(isset($_GET['gameDataId'])){
|
|||
header("Access-Control-Allow-Methods: GET");
|
||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $openGameDataStream->toJson(JSON_PRETTY_PRINT);
|
||||
echo json_encode(array('data' => $openGameDataStream->jsonSerialize()));
|
|
@ -13,7 +13,6 @@ header("Access-Control-Allow-Methods: GET");
|
|||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
|
||||
|
||||
echo json_encode(array('data' => $dbValue->jsonSerialize()));
|
||||
|
||||
//var_dump(headers_list());
|
|
@ -15,4 +15,4 @@ else{
|
|||
header("Access-Control-Allow-Methods: GET");
|
||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $groups->toJson(JSON_PRETTY_PRINT);
|
||||
echo json_encode(array('data' => $groups->jsonSerialize()));
|
|
@ -5,7 +5,7 @@ require_once "../Group/Group.php";
|
|||
|
||||
if(isLogin()){
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo Vote::where('group_id',groupViaToken($_SESSION['token'])->id)->get()->toJson(JSON_PRETTY_PRINT);
|
||||
echo json_encode(array('data' => Vote::where('group_id',groupViaToken($_SESSION['token'])->id)->get()->jsonSerialize()));
|
||||
|
||||
}else{
|
||||
echo http_response_code(401);
|
||||
|
|
|
@ -25,7 +25,7 @@ if(isAdmin() && isset($_GET['gameJamId'])){
|
|||
header("Access-Control-Allow-Methods: GET");
|
||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $winningGroups->toJson(JSON_PRETTY_PRINT);
|
||||
echo json_encode(array('data' => $winningGroups->jsonSerialize()));
|
||||
|
||||
|
||||
}else{
|
||||
|
|
|
@ -23,7 +23,7 @@ if (!isAdmin()){
|
|||
header("Access-Control-Allow-Methods: GET");
|
||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $find_all_keywords->pluck("key_word")->toJson(JSON_PRETTY_PRINT);
|
||||
echo json_encode(array('data' => $find_all_keywords->jsonSerialize()));
|
||||
}else{
|
||||
echo http_response_code(400);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue