Ejemplo n.º 1
0
        public IActionResult GetAllActiveEvents()
        {
            try
            {
                IEnumerable <EventDto> events = _eventLogic.GetAllActiveEvents();

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

                return(Ok(events));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, "Internal server error"));
            }
        }