Beispiel #1
0
        public async Task <IActionResult> RandomDeck()
        {
            KeyValuePair <string, string> deckInfo = await deckService.GetRandomDeckUrl();

            if (deckInfo.Value.Equals("error"))
            {
                return(RedirectToAction("RandomDeck"));
            }
            ViewData["Commander"] = deckInfo.Key;
            ViewData["DeckLink"]  = deckInfo.Value;

            return(View());
        }