Implement API playlists/update
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user