Exemplo n.º 1
0
        public async Task <IActionResult> GetInitiativesByYear()
        {
            var initiatives = await _initiativeService.GetInitiativesByYear();

            if (initiatives.Any())
            {
                return(Ok(initiatives));
            }

            if (!initiatives.Any())
            {
                return(NoContent());
            }
            return(BadRequest("Failed to get initiative list"));
        }