Handle save error in API playlists/update
This commit is contained in:
1 parent
5f993e4bd3
commit
223a6e7a85
2 files changed
+39
-11
No files matched your search
@@ -19,8 +19,11 @@ module API
|
||||
end
|
||||
|
||||
def update
|
||||
@playlist.update playlist_params
|
||||
head :no_content
|
||||
if @playlist.update playlist_params
|
||||
head :no_content
|
||||
else
|
||||
render json: @playlist.errors, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in new issue
Block a user