Implement API playlists/update
This commit is contained in:
1 parent
317c2b687f
commit
d03007c99f
3 files changed
+19
-3
No files matched your search
@@ -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