Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Node.js Bootcamp] Project 2: Blogger - Ready for Review #1 #1

Open
rajatb opened this issue May 14, 2015 · 2 comments
Open

[Node.js Bootcamp] Project 2: Blogger - Ready for Review #1 #1

rajatb opened this issue May 14, 2015 · 2 comments

Comments

@rajatb
Copy link
Owner

rajatb commented May 14, 2015

My app is complete ./cc @codepathreview @codepath

Few issues need help with.

  1. Adding a comment. The post schema has a comments object. I cannot do a push to it.
  2. How do I show images for all posts in the blog page? Since I get an array of posts. But I need to do some data uri stuff before I can show the images.
@codepathreview
Copy link

cc @CrabDude Hey Adam can you pls help @rajatb with his queries? Also @rajatb , I cant see the video walkthrough, pls submit that also.

Thanks

@CrabDude
Copy link
Contributor

@rajatb

#1.

Post.update(
    { "_id": id},
    { "$push": 
        {"coments": 
            {
                "text": "some comment",
                ...
            }
        }
    }
)

#2. Given an array of posts:

for (let post of posts) {
  // you'll need to implement convertToDataURI
  post.image = convertToDataURI(post.image)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants