Created
July 14, 2020 06:06
-
-
Save risenW/5a12d04d051f84f49e3ce7714c5b54c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
app.get("/recommend", (req, res) => { | |
let userId = req.query.userId | |
if (Number(userId) > 53424 || Number(userId) < 0) { | |
res.send("User Id cannot be greater than 53,424 or less than 0!") | |
} else { | |
recs = model.recommend(userId) | |
.then((recs) => { | |
res.render("index", { recommendations: recs, forUser: true }) | |
}) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment