Skip to content

Commit

Permalink
Merge pull request #322 from eesast/tmp
Browse files Browse the repository at this point in the history
fix: ContestResult type
  • Loading branch information
xiangmy21 authored May 7, 2024
2 parents 87f7b70 + 61c704c commit bf3b5c2
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 bf3b5c2

Please sign in to comment.