mirror of
				https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
				synced 2025-10-31 03:50:20 -04:00 
			
		
		
		
	Merge pull request #39 from jhuesser/api-json-header
Added json header to API response
This commit is contained in:
		
						commit
						b8de51d628
					
				| @ -13,6 +13,7 @@ else{ | |||||||
|   $timestamp = (isset($_GET['timestamp']))?$_GET['timestamp']:time(); |   $timestamp = (isset($_GET['timestamp']))?$_GET['timestamp']:time(); | ||||||
| 
 | 
 | ||||||
| 	$result = $constellation->get_incidents((isset($_GET['future'])?$_GET['future']:false), $offset, $limit, $timestamp); | 	$result = $constellation->get_incidents((isset($_GET['future'])?$_GET['future']:false), $offset, $limit, $timestamp); | ||||||
| 	 | 	header('Cache-Control: no-cache'); | ||||||
|  | 	header('Content-type: application/json'); | ||||||
| 	echo json_encode($result); | 	echo json_encode($result); | ||||||
| } | } | ||||||
| @ -7,6 +7,8 @@ if (!file_exists("../config.php")) | |||||||
| else{ | else{ | ||||||
|   require_once("../config.php"); |   require_once("../config.php"); | ||||||
|   require_once("../classes/constellation.php"); |   require_once("../classes/constellation.php"); | ||||||
|  |   header('Cache-Control: no-cache'); | ||||||
|  |   header('Content-type: application/json'); | ||||||
| 
 | 
 | ||||||
|   if (!isset($_GET['id'])) |   if (!isset($_GET['id'])) | ||||||
|   { |   { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user