Skip to content

Commit

Permalink
馃悰 Fix Json Capitalisation (#166)
Browse files Browse the repository at this point in the history
asdf
  • Loading branch information
MattParkerDev committed Mar 21, 2024
1 parent 927d11b commit 9f974ee
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Domain/Entities/LeaderboardUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

public class LeaderboardUser
{
public string Name { get; set; } = null!;
public string Email { get; set; } = null!;
public required string Name { get; set; }
public required string Email { get; set; }

public int LastMonth { get; set; }
public int LastYear { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions src/WebAPI/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public static class DependencyInjection
services.AddHttpContextAccessor();
services.AddScoped<ICurrentUserService, CurrentUserService>();

services.ConfigureHttpJsonOptions(options =>
{
options.SerializerOptions.PropertyNamingPolicy = null; // Override camelCase with PascalCase
});
services.AddSingleton<SignalRHubFilter>();

services.AddSignalR(options => options.AddFilter<SignalRHubFilter>());
Expand Down
2 changes: 1 addition & 1 deletion src/WebAPI/Routes/LeaderboardRoutes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class LeaderboardRoutes
{
public static void MapLeaderboardRoutes(this WebApplication app)
{
var routeGroup = app.MapGroup("").WithTags("Leaderboard");
var routeGroup = app.MapGroup("leaderboard").WithTags("Leaderboard");

routeGroup
.MapGet(
Expand Down
10 changes: 10 additions & 0 deletions src/WebUI/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"(Watch)": {
"commandName": "Executable",
"executablePath": "dotnet",
"workingDirectory": "$(ProjectDir)",
"commandLineArgs": "watch run",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_WATCH_RESTART_ON_RUDE_EDIT": "true"
}
}
}
}
4 changes: 2 additions & 2 deletions src/WebUI/RulesGptApiClients.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public virtual async System.Threading.Tasks.Task<System.Collections.Generic.List

var urlBuilder_ = new System.Text.StringBuilder();

// Operation Path: "getLeaderboardStats"
urlBuilder_.Append("getLeaderboardStats");
// Operation Path: "leaderboard/getLeaderboardStats"
urlBuilder_.Append("leaderboard/getLeaderboardStats");

PrepareRequest(client_, request_, urlBuilder_);

Expand Down

0 comments on commit 9f974ee

Please sign in to comment.