fc.addFlight(flightId, state);
res.put("result", "added");
} else if (path.contains("/api/flights")) {
// adds a flight status
Flights fs = Flights.getInstance();
JSONObject o = new JSONObject(request.getInputStream());
String flight = (String) o.get("flight");
String depart = (String) o.get("depart");
String arrive = (String) o.get("arrive");
String time = (String) o.get("time");
String flightTime = (String) o.get("flighttime");
fs.add(flight, depart, arrive, time, flightTime);
res.put("result", "added");
} else if (path.contains("/api/addmyflight")) {
} else if (path.contains("/api/login")) {