Backend Routes - annkim10/pupfinder GitHub Wiki
HTML
GET /
-StaticPagesController#root
API Endpoints
users
GET /api/users
- returns the user information with adopter profile info/favorited pups or rescue organization info/list of pupsPOST /api/users
- sign up
session
POST /api/session
- log inDELETE /api/session
- log out
pups
GET /api/pups
- returns all or relevant pups (filtered bydata
/params
)GET /api/pups/:id
- returns a pupPOST /api/pups
- creates a pupPATCH /api/pups/:id
- edit a pupDELETE /api/pups/:id
- remove a pup (yay! they've been adopted!)
favorites
POST /api/favorites
- favorites a pupDELETE /api/favorites/:id
- unfavorite a pup
NOTE: favorites
does not include a GET
route as it will be rendered under the user's show page as depicted in the Sample State