diff --git a/src/GZCTF/Repositories/GameRepository.cs b/src/GZCTF/Repositories/GameRepository.cs index a680a4780..82b05b84f 100644 --- a/src/GZCTF/Repositories/GameRepository.cs +++ b/src/GZCTF/Repositories/GameRepository.cs @@ -52,7 +52,8 @@ public string GetToken(Game game, Team team) => context.Games.FirstOrDefaultAsync(x => x.Id == id, token); public Task GetUpcomingGames(CancellationToken token = default) - => context.Games.Where(g => g.StartTimeUTC - DateTime.UtcNow < TimeSpan.FromMinutes(5)) + => context.Games.Where(g => g.StartTimeUTC > DateTime.UtcNow + && g.StartTimeUTC - DateTime.UtcNow < TimeSpan.FromMinutes(5)) .OrderBy(g => g.StartTimeUTC).Select(g => g.Id).ToArrayAsync(token); public async Task GetBasicGameInfo(int count = 10, int skip = 0, CancellationToken token = default)