Skip to content

delete post by ID #68

@LinaYahya

Description

@LinaYahya

In router.js at delete post, You already checking if a user is authorized and have a valid token then it will next you to handleDeletePost,

router.delete('/post/:id', checkAuth, handleDeletePost);

So any user who has an account can delete any post even it's not his own post.

So we need a query to check if the user who sends the request is the same person who has the post before deleting it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreview

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions