Example #1
0
 public async Task <VillainDeck> Post([FromBody] UserFilter userFilter)
 {
     try
     {
         return(await _blc.GetVillainDeck(userFilter));
     }
     catch (Exception ex)
     {
         throw new HttpRequestException(ex.Message);
     }
 }
        public async Task <VillainDeck> PostAsync([FromBody] Filter filter)
        {
            try
            {
                if (filter == null)
                {
                    throw new HttpRequestException("Invalid filter data");
                }

                return(await _blc.GetVillainDeck(filter));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                throw new HttpRequestException(ex.Message);
            }
        }