Example #1
0
        public IActionResult GetSongFromPlaylist(Guid playlistId, Guid songId)
        {
            if (!_sprotifyRepository.PlaylistExists(playlistId))
            {
                return(NotFound());
            }

            var song = _sprotifyRepository.GetSongFromPlaylist(playlistId, songId);

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

            return(Ok(Mapper.Map <Models.Song>(song)));
        }