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

Incorrect data insertion ! #47

Open
AlaaTaima opened this issue Mar 4, 2020 · 0 comments
Open

Incorrect data insertion ! #47

AlaaTaima opened this issue Mar 4, 2020 · 0 comments
Labels

Comments

@AlaaTaima
Copy link

const addPost = (req, res, next) => addPosts(req.body).then(() => res.redirect('/home')).catch((err) => {

  • Here, I see you try to let the user add his own post but, you didn't handle it correctly.
  • You can reach to the current user by his id or other user-data that you should send it by cookie , then you can store user post correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant