forked from boolean-uk/java-team-dev-server-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem Description
As a user that is logged in , I want to edit and delete my posts,
so that I can update mistakes or remove content.
Required Changes
- implement endpoint put/patch for editing /posts/{id}
- implement endpoint delete for deleting /posts/{id}
the endpoints should: - verify logged in user as author of post
- update content and timestamp(edit)
- remove post from database(delete)
- return proper succes or error message
Acceptance Criteria
succes response
- 200 updated post object (Edit)
- 200 with message "post deleted"(Delete)
error response - 403 if the user is not the author "you can't edit this post"
- 403 if the user is not the author "you can't delete this post"
- 404 if post doesn't exist (Edit+Delete)
Dependencies
- required database table posts with user information
- verify logged in user
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo