public async Task <ActionResult <Client> > GetClient([FromRoute] string clientName) { var client = await _clientsApi.GetClientByNameAsync(clientName); if (client == null) { return(NotFound()); } return(Ok(client)); }
public async Task <DailyClientInfo> GetDailyClientInfoAsync(string companyName) { var joke = await _companyJokeService.GetJokeForClientAsync(companyName); var client = await _clientsApi.GetClientByNameAsync(companyName); var weather = (await _weatherApi.GetWeatherByZipCode(client.ZipCode)).Weather.First().Description; return(new DailyClientInfo { JokeOfTheDay = joke, Weather = weather }); }