Ejemplo n.º 1
0
        public async Task <IActionResult> GetAllPlatforms()
        {
            try
            {
                var platforms = await _clanService.GetClanPlatformsAsync();

                if (platforms == null)
                {
                    return(NotFound());
                }

                if (!platforms.Any())
                {
                    return(NotFound());
                }

                return(Ok(platforms));
            }
            catch (Exception)
            {
                return(BadRequest(new Exception("Something went wrong while processing the request.")
                {
                    Source = ""
                }));
            }
        }