Esempio n. 1
0
        public IActionResult DeletePlaylist(Guid id)
        {
            var playListEntity = _sprotifyRepository.GetPlaylist(id);

            if (playListEntity == null)
            {
                return(NotFound());
            }

            _sprotifyRepository.DeletePlaylist(playListEntity);

            if (!_sprotifyRepository.Save())
            {
                throw new Exception($"Deleting playlist {id} failed.");
            }

            return(NoContent());
        }