Created
March 8, 2014 16:57
-
-
Save danielmelogpi/9434949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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