Add a route to post edit page
- Path is '/posts/:_id/edit'
- Variable data is passed to page by returning the post in the database
Add post edit template
- Create post edit template with a form to edit the post
- Users can edit URL and Title of posts
- Submit button will send the edited params to database
- There is also a button to delete the post
Add postEdit js
- Handles submitting the edit post form by finding the post in the database and editing it
- Error handling if the update does not work
- Routes to postPage when the edit is succesful
- Also handles the post deletion by finding the post and removing it
- After removed (or not), the router will go to the postsList page
Add edit links to posts
- Edit links allow users to edit their posts
- To prevent other users from editing a user's posts, I will implement a helper in the following commit
Add ownPost helper to post_item.js
- ownPost will return true if the user that clicked the edit post button is the post's user
- ownPost will return false if the user that clicked the edit post button is NOT the post's user
- This will prevent other users from editing the user's posts
Merge pull request #19 from alexanderdavidpan/Add_Edit_Posts_Form

Add edit posts form