Implement API playlists/update

This commit is contained in:
Thibault Jouan
2015-05-03 23:20:43 +00:00
parent 317c2b687f
commit d03007c99f
3 changed files with 19 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
module API
class PlaylistsController < ApplicationController
before_action :set_playlist, only: :show
before_action :set_playlist, only: %i[show update]
def index
@playlists = Playlist.all
@@ -14,6 +14,11 @@ module API
@playlist.save
end
def update
@playlist.update playlist_params
head :no_content
end
private