nss-day-cohort-46 / rare-server-groovy-goblins

rare-server-groovy-goblins created by GitHub Classroom
0 stars 2 forks source link

feat: user can delete thier post. #62

Closed CheoR closed 3 years ago

CheoR commented 3 years ago

Description

User can delete their post.

Closes #14

Type of change

Testing Instructions

In server terminal

git fetch --all git checkout cr-post-delete watchgod request_handler.main

If no posts for logged-in user created yet


INSERT INTO Posts (
    "user_id",
    "category_id",
    "title",
    "publication_date",
    "image_url",
    "content",
    "approved"
  )
VALUES(
    2,
    1,
    'Delete This Post',
    DATETIME(),
    '',
    'Post to Delete',
    true
  );

Either in the browser or through postman, delete the post. In browser, user will be redirected to /posts/user/${user_id}.

Checklist: