Skip to content

Commit

Permalink
wip: tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Oct 18, 2022
1 parent 857c51e commit 2005a4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions GZCTF/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ await context.Posts.AddAsync(new()
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseOpenApi(options => { options.PostProcess += (document, _) => { document.Servers.Clear(); }; });
app.UseOpenApi(options => options.PostProcess += (document, _) => { document.Servers.Clear(); } );
app.UseSerilogRequestLogging(options =>
{
options.MessageTemplate = "[{StatusCode}] @{Elapsed,8:####0.00}ms HTTP {RequestMethod,-6} {RequestPath}";
Expand Down Expand Up @@ -334,8 +334,7 @@ await context.Posts.AddAsync(new()

try
{
var version = Assembly.GetExecutingAssembly()
.GetCustomAttribute<AssemblyDescriptionAttribute>()?.Description;
var version = typeof(Program).Assembly.GetCustomAttribute<AssemblyDescriptionAttribute>()?.Description;
logger.SystemLog(version ?? "GZ::CTF", CTFServer.TaskStatus.Pending, LogLevel.Debug);
await app.RunAsync();
}
Expand Down
2 changes: 1 addition & 1 deletion GZCTF/Repositories/GameRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private static IEnumerable<ScoreboardItem> GenScoreboardItems(Data[] data, Game
.OrderBy(t => t).LastOrDefault(game.StartTimeUTC),
SolvedCount = challengeGroup.Count(c => c.Any(
s => s.Submission?.Status == AnswerResult.Accepted
&& s.Submission?.SubmitTimeUTC < game.EndTimeUTC)),
&& s.Submission.SubmitTimeUTC < game.EndTimeUTC)),
Challenges = challengeGroup
.Select(c =>
{
Expand Down

0 comments on commit 2005a4e

Please sign in to comment.