Skip to content

Commit

Permalink
fix: ContestResult type
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangmy21 authored May 7, 2024
1 parent 242999a commit 1fcce7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logic/Server/GameServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Server
public class ContestResult
{
public string status;
public int[] scores;
public double[] scores;
}
partial class GameServer : ServerBase
{
Expand Down
2 changes: 1 addition & 1 deletion logic/Server/HttpSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task<double[]> GetLadderScore(double[] scores)

// 解析 JSON 字符串
var result = JsonConvert.DeserializeObject<ContestResult>(jsonString);
return result.Scores.Select(score => (double)score).ToArray();
return result.scores.Select(score => (double)score).ToArray();
}
catch (Exception e)
{
Expand Down

0 comments on commit 1fcce7d

Please sign in to comment.