fix: wrong comparaison with expire time

This commit is contained in:
Émilien (perso) 2024-12-14 18:29:43 +01:00 committed by GitHub
parent ec006b3999
commit 2562d701b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -290,7 +290,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
let now = now.duration_since(UNIX_EPOCH) let now = now.duration_since(UNIX_EPOCH)
.expect("Time went backwards") .expect("Time went backwards")
.as_secs() as i64; .as_secs() as i64;
if now < expiry { if now > expiry {
return Err("Expire time in past".into()); return Err("Expire time in past".into());
} }
} }