public dynamic Get(string meetupEventUrl) { // find this meetup events if we can var events = _meetupService.GetMeetup(meetupEventUrl); if (events == null) { Response.StatusCode = 404; return(new { Message = $"Could not found Meetup with URL Name {meetupEventUrl}" }); } // convert the events to weather return(events.Select(t => new { Event = t, Weather = _weatherService.GetWeatherForLatLong(t.Group.Lat, t.Group.Lon, t.EventDate) ?? "Unavailable" })); }
public async Task <IActionResult> GetMeetup(int id, int userId) { var result = await _service.GetMeetup(id, userId); return(Ok(result)); }