Skip to content

Commit

Permalink
Revert "Fix null in s->c dtos"
Browse files Browse the repository at this point in the history
This reverts commit 28a461d.
  • Loading branch information
SophiaH67 committed Jan 31, 2024
1 parent 409f892 commit ff148e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

public interface IXiJinpingResponseDto
public class XiJinpingResponseDto
{
[JsonProperty(PropertyName = "messages")]
public string[] Messages { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion packages/xi-jinping-bot/util/Backend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public async Task<string[]> ProcessMessage(SocketMessage message)
}

string responseJson = await response.Content.ReadAsStringAsync();
IXiJinpingResponseDto? responseDto = JsonConvert.DeserializeObject<IXiJinpingResponseDto>(responseJson);
XiJinpingResponseDto? responseDto = JsonConvert.DeserializeObject<XiJinpingResponseDto>(responseJson);

if (responseDto?.Messages == null)
{
Expand Down

0 comments on commit ff148e6

Please sign in to comment.