Skip to content

Incorrect data insertion ! #47

@AlaaTaima

Description

@AlaaTaima

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions