Skip to content

Commit

Permalink
fix: can not prolong containers
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Apr 8, 2023
1 parent 73a3a42 commit fc535e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GZCTF/Controllers/GameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ public async Task<IActionResult> ProlongContainer([FromRoute] int id, [FromRoute
if (instance.Container is null)
return BadRequest(new RequestResponse("题目未创建容器"));

if (instance.Container.ExpectStopAt - DateTimeOffset.UtcNow < TimeSpan.FromMinutes(10))
if (instance.Container.ExpectStopAt - DateTimeOffset.UtcNow > TimeSpan.FromMinutes(10))
return BadRequest(new RequestResponse("容器时间尚不可延长"));

await instanceRepository.ProlongContainer(instance.Container, TimeSpan.FromHours(2), token);
Expand Down

0 comments on commit fc535e4

Please sign in to comment.