Browse Source

Fixes in the location API.

Iñigo Valentin 9 năm trước cách đây
mục cha
commit
580e3176fe
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      www/API/v1/location.php

+ 6 - 1
www/API/v1/location.php

@@ -60,6 +60,8 @@
 		//Bad request
 		http_response_code(400);
 		$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
+		error_log($error);
+		exit(-1);
 	}
 	
 	//Get location
@@ -72,11 +74,14 @@
 				break;
 			default:
 				http_response_code(400);
-			$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
+				$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
+				error_log($error);
+				exit(-2);
 		}
 	}
 	else{
 		//No content
 		http_response_code(204);
+		exit(0);
 	}
 ?>