public IActionResult SendBackgroundSongResult([FromBody] SendBackgroundSongResultRequest request) { try { _clientTriggerService.SendSongToChat(request.Username, request.Title, request.Artist, request.Url); return(Ok()); } catch (Exception e) { _logger.LogError(e, "Error in SendBackgroundSongResult"); } return(BadRequest()); }
public async Task <bool> SendBackgroundSongResult(SendBackgroundSongResultRequest request) { try { var result = await _clientTriggerClient.PostAsync("SendBackgroundSongResult", HttpClientHelper.GetJsonData(request)); return(result.IsSuccessStatusCode); } catch (Exception e) { return(HttpClientHelper.LogError <bool>(_logger, e, new object[] { request.Username, request.Title, request.Artist, request.Url })); } }