Exemple #1
0
        public async Task <ApiResult> GetUserPlaylists(int userId)
        {
            List <Playlist> playlistsEntities = await _playlistService.GetUserPlaylists(userId);

            var playlistsModels = _mapper.Map <List <Core.Models.Playlist> >(playlistsEntities);

            foreach (var p in playlistsModels)
            {
                if (p.Image != null)
                {
                    p.Image = _fileManagementService.CreateBase64String(p.Image);
                }
            }

            return(ApiResult.Success(playlistsModels));
        }