public async Task <EditRequestResponse> EditSuperVip(EditSuperVipRequest editSuperVipRequest) { try { var result = await _playlistClient.PostAsync("EditSuperVipRequest", HttpClientHelper.GetJsonData(editSuperVipRequest)); return(JsonConvert.DeserializeObject <EditRequestResponse>(await result.Content.ReadAsStringAsync())); } catch (Exception e) { return(HttpClientHelper.LogError <EditRequestResponse>(_logger, e, new object[] { editSuperVipRequest.Username, editSuperVipRequest.CommandText })); } }
public IActionResult EditSuperVipRequest([FromBody] EditSuperVipRequest requestModel) { try { var editSuperVipResult = _playlistService.EditSuperVipRequest(requestModel.Username, requestModel.CommandText); if (editSuperVipResult) { return(Ok()); } } catch (Exception e) { _logger.LogError(e, "Error in EditSuperVipRequest", requestModel); } return(BadRequest()); }