Skip to content

Instantly share code, notes, and snippets.

@danielmelogpi
Created March 8, 2014 16:57
Show Gist options
  • Save danielmelogpi/9434949 to your computer and use it in GitHub Desktop.
Save danielmelogpi/9434949 to your computer and use it in GitHub Desktop.
exports.flight = function(req, res){
var number = req.param("number");
if (typeof flights[number] == "undefined") {
res.status(400).json({status: "error", msg: "this is undefined flight"});
}
else {
res.json(flights[number].getInformation());
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment