Ejemplo n.º 1
0
        public async Task <IActionResult> Index(string?artist = null, string?album = null, string?song = null, bool embed = false)
        {
            var user = await GetUser();

            var userVm = user != null?_mapper.Map <UserViewModel>(user) : null;

            var loadedSong = await GetSongFromQuery(artist, album, song);

            var homeViewModel = HomeViewModel.From(userVm, loadedSong, _appOptions, _cdnOptions);

            homeViewModel.Embed = embed;
            homeViewModel.CacheBustedAngularViews = _ngViews.Views;

            // TODO
            //homeViewModel.Redirect =

            return(View("Index", homeViewModel));
        }