Commit 87f0d0a6 authored by baesangjune's avatar baesangjune
Browse files

채린아 고마워

parent 2e335d43
......@@ -81,17 +81,18 @@ const getReview = async (link) => {
}
const find = (req, res, next) => {
console.log("7", req.body)
if (req.body.db) {
next()
}
Review.find({ keyword:{ $elemMatch: res.query.keyword } }, function (err, reviews) {
if (reviews) {
if (reviews.length > 10)
res.send(reviews, { db: true })
req.reviews = reviews
}
next()
})
res.send("안녕")
// console.log("7", req.body)
// if (req.body.db) {
// next()
// }
// Review.find({ keyword:{ $elemMatch: res.query.keyword } }, function (err, reviews) {
// if (reviews) {
// if (reviews.length > 10)
// res.send(reviews, { db: true })
// req.reviews = reviews
// }
// next()
// })
}
export default { search, find }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment