Created
December 27, 2016 16:01
-
-
Save peat-psuwit/4f14e0428d44afb1b6e99bf6d2b021a0 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
function find(obj) { | |
//what argument do I have? | |
console.log(obj); | |
} | |
var req = { | |
body: { | |
username: "peat", | |
password: "123456" | |
} | |
} | |
//What you're doing | |
find(req.body.username); | |
//What must be done | |
find({username: req.body.username}); | |
find(req.body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment