public async Task <HttpStatusCode> PutChatBan(ChatBanPutDto chatBan) { var httpClient = new HttpClient(); var serializedObject = JsonConvert.SerializeObject(chatBan); var buffer = System.Text.Encoding.UTF8.GetBytes(serializedObject); var byteContent = new ByteArrayContent(buffer); byteContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); var result = await httpClient.PostAsync($"{MatchmakingApiUrl}/flo/globalChatBans?secret={MatchmakingAdminSecret}", byteContent); return(result.StatusCode); }
public async Task <IActionResult> PutChatBan([FromBody] ChatBanPutDto chatBan) { await _adminRepository.PutChatBan(chatBan); return(Ok()); }