Merge pull request #267 from unixfox/fix-expire-check
fix: wrong comparaison with expire time
This commit is contained in:
commit
47007b9ea2
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
|
|||
let now = now.duration_since(UNIX_EPOCH)
|
||||
.expect("Time went backwards")
|
||||
.as_secs() as i64;
|
||||
if now < expiry {
|
||||
if now > expiry {
|
||||
return Err("Expire time in past".into());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue