backend routes - Requiem-of-Zero/Slapify_project GitHub Wiki
             Backend Routes
HTML
- GET /- StaticPagesController#root
API Endpoints
users
- GET /api/users- returns user info of playlists and liked songs/albums
- POST /api/users- sign up a user
session
- POST /api/session- log in user
- DELETE /api/session- log out current user
songs
- GET /api/songs- returns all songs on app
- GET /api/song/:id- returns the song
- DELETE /api/playlists/:playlist_id/songs- remove a song from a playlist
playlists
- GET /api/playlists- returns the user's playlists
- GET /api/:playlist/:id- returns the playlist's songs
- POST /api/playlists- creates a new playlist
- DELETE /api/playlist- removes a playlist and songs inside them
playlistSongs
- POST /api/playlist_songs- adds a song to a playlist
- DELETE /api/playlist_song/:playlist_song_id- removes a song from a playlist
albums
- GET /api/albums- returns all the albums on app
- GET /api/album/:id- returns the songs in the selected album
artists
- GET /api/artist/:id- returns albums/songs from that individual artist
likes
- POST /api/song/:song_id/likes- like a song
- DELETE /api/song/:song_id/likes- unlike a song
- POST /api/album/:album_id/likes- like an album
- DELETE /api/album/:album_id/likes- unlike an album