Implement playlists/show in API
This commit is contained in:
@@ -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
|
||||
|
4
app/views/api/playlists/show.rabl
Normal file
4
app/views/api/playlists/show.rabl
Normal file
@@ -0,0 +1,4 @@
|
||||
object @playlist
|
||||
|
||||
attribute :id
|
||||
attribute :name
|
Reference in New Issue
Block a user