changing posts to reference clerkUserID rather than id in mongodb
This commit is contained in:
@@ -37,7 +37,7 @@ export const getPost = async (req, res, next) => {
|
||||
|
||||
export const getAllPostsByUser = async (req, res, next) => {
|
||||
console.log(req.params)
|
||||
const posts = await Post.find({ userID: req.params.user }).exec()
|
||||
const posts = await Post.find({ clerkUserID: req.params.id }).exec()
|
||||
posts.map((el) => {
|
||||
el.photo = process.env.CLOUDFRONT_URL + el.photo
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user