Closed LindZCoding closed 2 years ago
example of what the model info looks like
what does the console log show? the one that says console.log('title', req.params.title)
it shows whatever i put in at the end of that: title 1
when i try to find it this way:
story: {
title: req.params.title
}
})```
it gives me back: dialogue found here: null
11:22:51 GMT-0800 (Pacific Standard Time):
TypeError: Cannot read properties of null (reading 'toObject')
vs when i had it like
``` Dialogue.dialogueModel.findOne({
title: req.params.title
})```
it gave me no error but it only will send back info on title 1 and nothing else
hmmmmm, let's look in a breakout room
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
MERN
What's the problem you're trying to solve?
trying to go to the next chapter based off of the title
Post any code you think might be relevant (one fenced block per file)