Ejemplo n.º 1
0
        public async Task <IHttpActionResult> GetCards([FromBody] CardsRequest request)
        {
            try
            {
                var response = await _deckService.GetCardsForDecks(request.DeckList);

                if (response.Succeeded)
                {
                    return(Ok(response.ResponseBody));
                }

                return(BadRequest(response.ErrorMessage));
            }
            catch (Exception e)
            {
                return(InternalServerError(e));
            }
        }