Skip to content

Commit

Permalink
fix: Another test for api formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
itssimple committed Jan 6, 2024
1 parent bb85fdf commit 41e822f
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions CFLookup/StatsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,9 @@ public async Task<IActionResult> MinecraftModStatsOverTimeV2()
modloaderStats[modloader] = new List<GameVersionTimestampInfo>();
}

if (!modloaderStats[modloader].Any(gvt => gvt.Timestamp == date))
{
modloaderStats[modloader].Add(new GameVersionTimestampInfo
{
Timestamp = date
});
}

var gameVersionInfo = modloaderStats[modloader].First(gvt => gvt.Timestamp == date);
gameVersionInfo.GameVersionInfo.Add(new GameVersionInfo
modloaderStats[modloader].Add(new GameVersionTimestampInfo
{
Timestamp = date,
GameVersion = gameVersion,
Count = count
});
Expand All @@ -113,11 +105,6 @@ public async Task<IActionResult> MinecraftModStatsOverTimeV2()
public class GameVersionTimestampInfo
{
public DateTimeOffset Timestamp { get; set; }
public List<GameVersionInfo> GameVersionInfo { get; set; } = new List<GameVersionInfo>();
}

public class GameVersionInfo
{
public string GameVersion { get; set; }

Check warning on line 108 in CFLookup/StatsController.cs

View workflow job for this annotation

GitHub Actions / generate

Non-nullable property 'GameVersion' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public long Count { get; set; }
}
Expand Down

0 comments on commit 41e822f

Please sign in to comment.