Implement API playlists/destroy
This commit is contained in:
1 parent
d03007c99f
commit
689fe2f4dd
3 files changed
+14
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
module API
|
||||
class PlaylistsController < ApplicationController
|
||||
before_action :set_playlist, only: %i[show update]
|
||||
before_action :set_playlist, only: %i[show update destroy]
|
||||
|
||||
def index
|
||||
@playlists = Playlist.all
|
||||
@@ -19,6 +19,11 @@ module API
|
||||
head :no_content
|
||||
end
|
||||
|
||||
def destroy
|
||||
@playlist.destroy
|
||||
head :no_content
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
|
||||
Reference in new issue
Block a user