Implement API playlists/destroy
This commit is contained in:
@@ -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