Skip to content

Commit

Permalink
Log successful level uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Nov 3, 2023
1 parent 387bd95 commit ad38a31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Refresh.GameServer/Endpoints/Game/Levels/PublishEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public Response PublishLevel(RequestContext context, GameUser user, Token token,

if (level.LevelId != default) // Republish requests contain the id of the old level
{
context.Logger.LogInfo(BunkumCategory.UserContent, "Republishing level id " + level.LevelId);
context.Logger.LogInfo(BunkumCategory.UserContent, "Republishing level id {0}", level.LevelId);

GameLevel? newBody;
// ReSharper disable once InvertIf
Expand All @@ -115,6 +115,8 @@ public Response PublishLevel(RequestContext context, GameUser user, Token token,
database.AddLevel(level);
database.CreateLevelUploadEvent(user, level);

context.Logger.LogInfo(BunkumCategory.UserContent, "User {0} (id: {1}) uploaded level id {2}", user.Username, user.UserId, level.LevelId);

return new Response(GameLevelResponse.FromOld(level)!, ContentType.Xml);
}

Expand Down

0 comments on commit ad38a31

Please sign in to comment.