Backend Routes - Orenshaf/SoundProud GitHub Wiki
Backend Routes
HTML
GET /
StaticPagesController#root
API Endpoints
users
GET /api/users
- returns the user information of uploaded and liked tracks and for the User Search featurePOST /api/users
- sign up
session
POST /api/session
- log inDELETE /api/session
- log out
tracks
GET /api/tracks
- returns relevant tracks (filtered bydata
/params
)GET /api/tracks/:id
- returns tracksPOST /api/tracks
- creates a trackPATCH /api/tracks/:id
- edit a trackDELETE /api/tracks/:id
- remove a track
comments
GET /api/comments
- gets all commentsPOST /api/comments
- creates a commentDELETE /api/comments/:id
- remove a comment
###BONUS!
likes
GET /api/likes
- gets all likesPOST /api/likes
- like a trackDELETE /api/likes
- unlike a track
Note: comments and likes do not include a GET
route because we will have these routes render the api/tracks/show.json.jbuilder
view. See Sample State.3