Last active
August 10, 2022 13:31
-
-
Save ShivamTyagi12345/3803e5a901a856815f06a4e644a808a6 to your computer and use it in GitHub Desktop.
This function displays the details of dog once the function "dog_details" is called
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
const dog_details = (req, res) => { | |
const id = req.params.id; | |
Dog.findById(id) | |
.then(result => { | |
res.render('details', { dog: result, title: 'Dog Details' }); | |
}) | |
.catch(err => { | |
console.log(err); | |
}); | |
} | |
module.exports = {dog_details} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment