get json update
This commit is contained in:
@@ -17,4 +17,4 @@ if(isset($_GET['gameDataId'])){
|
|||||||
header("Access-Control-Allow-Methods: GET");
|
header("Access-Control-Allow-Methods: GET");
|
||||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||||
header('Content-Type: application/json;charset=UTF-8');
|
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("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||||
header('Content-Type: application/json;charset=UTF-8');
|
header('Content-Type: application/json;charset=UTF-8');
|
||||||
|
|
||||||
|
|
||||||
echo json_encode(array('data' => $dbValue->jsonSerialize()));
|
echo json_encode(array('data' => $dbValue->jsonSerialize()));
|
||||||
|
|
||||||
//var_dump(headers_list());
|
//var_dump(headers_list());
|
||||||
@@ -15,4 +15,4 @@ else{
|
|||||||
header("Access-Control-Allow-Methods: GET");
|
header("Access-Control-Allow-Methods: GET");
|
||||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||||
header('Content-Type: application/json;charset=UTF-8');
|
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()){
|
if(isLogin()){
|
||||||
header('Content-Type: application/json;charset=UTF-8');
|
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{
|
}else{
|
||||||
echo http_response_code(401);
|
echo http_response_code(401);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ if(isAdmin() && isset($_GET['gameJamId'])){
|
|||||||
header("Access-Control-Allow-Methods: GET");
|
header("Access-Control-Allow-Methods: GET");
|
||||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||||
header('Content-Type: application/json;charset=UTF-8');
|
header('Content-Type: application/json;charset=UTF-8');
|
||||||
echo $winningGroups->toJson(JSON_PRETTY_PRINT);
|
echo json_encode(array('data' => $winningGroups->jsonSerialize()));
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ if (!isAdmin()){
|
|||||||
header("Access-Control-Allow-Methods: GET");
|
header("Access-Control-Allow-Methods: GET");
|
||||||
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept");
|
||||||
header('Content-Type: application/json;charset=UTF-8');
|
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{
|
}else{
|
||||||
echo http_response_code(400);
|
echo http_response_code(400);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user