public async Task <IActionResult> ApproveMerchant(string eventKey, string user, string option) { _logger.LogInformation("merchantapproval: {eventKey}, {user}, {approvalData}", eventKey, user, option); var openItems = _host.GetOpenUserActions(eventKey); string key = null; foreach (var item in openItems) { foreach (var opt in item.Options) { _logger.LogInformation(" - " + opt.Key + " : " + opt.Value + ", "); } key = item.Key; string value = item.Options.Single(x => x.Value == option).Value; _logger.LogInformation("Choosing key:" + key + " value:" + value); } await _host.PublishUserAction(key, user, option); return(Ok()); }