Skip to content

Commit e27a959

Browse files
committed
fix: comming games
1 parent d9bfff1 commit e27a959

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GZCTF/Repositories/GameRepository.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public string GetToken(Game game, Team team)
5252
=> context.Games.FirstOrDefaultAsync(x => x.Id == id, token);
5353

5454
public Task<int[]> GetUpcomingGames(CancellationToken token = default)
55-
=> context.Games.Where(g => g.StartTimeUTC - DateTime.UtcNow < TimeSpan.FromMinutes(5))
55+
=> context.Games.Where(g => g.StartTimeUTC > DateTime.UtcNow
56+
&& g.StartTimeUTC - DateTime.UtcNow < TimeSpan.FromMinutes(5))
5657
.OrderBy(g => g.StartTimeUTC).Select(g => g.Id).ToArrayAsync(token);
5758

5859
public async Task<BasicGameInfoModel[]> GetBasicGameInfo(int count = 10, int skip = 0, CancellationToken token = default)

0 commit comments

Comments
 (0)