public void DeleteChatTest() { try { var chats = Client.CurrentUsersChats(); if (chats != null && chats.Chats.Count > 0) { var firstChat = chats.Chats.FirstOrDefault(); if (firstChat != null) { DeleteChatRequest request = new DeleteChatRequest() { ChatIden = firstChat.Iden }; Client.DeleteChat(request); } } } catch (Exception ex) { Assert.Fail(ex.Message); } }
public IActionResult Delete([FromQuery] DeleteChatRequest request) { try { this.chatRepository.DeleteChat(request.ChatIdentifier); return(Ok()); } catch (ChatNotFoundException ex) { this.logger.LogWarning(ex.Message); return(NotFound()); } }