Implement playlists/show in API

This commit is contained in:
Thibault Jouan
2015-05-01 20:06:20 +00:00
parent 35be3e21b6
commit b3cfa88bb9
4 changed files with 19 additions and 1 deletions

View File

@@ -4,6 +4,10 @@ module API
@playlists = Playlist.all
end
def show
@playlist = Playlist.find(params[:id])
end
def create
@playlist = current_user.playlists.build playlist_params
@playlist.save