Ejemplo n.º 1
0
        public IActionResult FindEventsByUser(string name)
        {
            if (name.Length == 0)
            {
                return(BadRequest("Name is invalid!"));
            }
            List <Event> events = _srv.FindEventsByUser(name);

            if (events == null)
            {
                return(NotFound($"No results found for events when searching for: {name}"));
            }
            return(Ok(events));
        }