Frontend Routes - OndreWilliams/TownSquare GitHub Wiki

User-Facing Routes


/signUp -

  • get - displays signup page
  • post - submits signup form

/logIn -

  • get - displays login page
  • post - submits login form

/home(protected) -

  • get - displays cities

/cities/:cityId -

  • get - displays questions for city with id

/question -

  • post - adds a new question within city
  • put - edits a question belonging to current user
  • delete - deletes question belonging to current user

/comment -

  • post - adds a comment to a question
  • put - edits a comment belonging to current user
  • delete - deletes comment belonging to current user

/vote -

  • post - adds a vote to a comment
  • put(?) - edits a vote belonging to current user
  • delete - deletes vote belonging to current user