// Creates a new flight status
JSONObject o = new JSONObject(request.getInputStream());
String flightId = o.getString("flightId");
String state = o.getString("state");
FlightController fc = FlightController.getInstance();
fc.addFlight(flightId, state);
res.put("result", "added");
} else if (path.contains("/api/myflights/")) {
// Adds a flight
Principal prin = request.getUserPrincipal();
if (prin != null) {