i dont understand the navigation with tabs and sub-stack routing but this is as close as im going to get it for now as it is 12:48 am and i must be up at 6:30 lol
This commit is contained in:
@@ -26,6 +26,8 @@ export const getAllPostsByStatus = async (req, res, next) => {
|
||||
|
||||
export const getPost = async (req, res, next) => {
|
||||
const post = await Post.findById(req.params.id).exec()
|
||||
|
||||
post.photo = process.env.CLOUDFRONT_URL + post.photo
|
||||
if (!post) {
|
||||
return next('No document found with that id', 404)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user