Frontend Routes - TranquilTort/Ask-Meeple GitHub Wiki
User-facing routes
/
This page is the homepage, it displays posts, sorted by most recent.
GET /
Search results
GET /search/:search-term
DELETE /posts/:id
/sign-in
This page displays a form for signing into an account.
GET /sign-in
POST /sign-in
/users/register
This page displays a form for registering a new user.
GET /users/register
POST /users/register
/new-post
This page displays a blank form for a new post.
GET /new-post
POST /new-post
/posts/:id
This page displays a particular post's body, as well as its comments. New comments for a given post are entered here.
GET /posts/:id
POST /posts/:id/comments
DELETE /posts/:id
DELETE /posts/:post-id/comments/:comment-id
PUT /posts/:post-id/comments/:comment-id
/posts/:id/edit
This page displays a form for editing an existing post. The form will be pre-filled with existing data. /posts/:id/edit
is also were users can delete their posts.
GET /posts/:id/edit
POST /posts/:id/edit
DELETE /posts/:id/edit