POSTS can create, read, update, and delete posts
amandahinton opened this issue · comments
CREATE
- backend GET /posts/new
- backend POST /posts/new
- frontend GET /posts/new -> get new post form
- frontend POST /posts/new
- user submits at least one photo (1-5), title, description
- user cannot submit until no errors
- user gets three new missions generated after completing post
- !!! user can only make a post from the current mission
- successful submission adds to database, including location from missions slice of state
- refresh profile page after creation
- posts slice of state is updated
- CSS
READ
- backend GET /posts/:postID
- frontend GET /posts/postID
- all previous posts are visible on user's profile page
- some posts are available on explore page
- all details (map, photos, title, description, likes, comments, user, created_at date) of individual post available on detail id page
- CSS
UPDATE
-
backend PUT /posts/:postID
-
frontend PUT /posts/postID -> update your post form (you cannot change the photos, only text)
-
user can update only description
-
edit form pre-populates current info in the modal
-
changes column data for that row in database
-
refreshes post detail page
-
CSS
DELETE
- backend DELETE /posts/:postID
- frontend DELETE /posts/postID -> deletes your posts
- delete button on post with confirmation modal
- removes post from database
- refresh profile page after deletion
- CSS
check in with anyone else working on comment updates for similar experience