Implement API playlists/destroy

This commit is contained in:
Thibault Jouan
2015-05-03 23:35:53 +00:00
parent d03007c99f
commit 689fe2f4dd
3 changed files with 14 additions and 2 deletions

View File

@@ -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