We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 386450f commit 23d9b7cCopy full SHA for 23d9b7c
src/middleware/token_auth.rs
@@ -53,9 +53,10 @@ impl<'r> FromRequest<'r> for TokenAuth {
53
54
match db.transaction(|conn| {
55
if let Ok(token) = conn.get_token(PlainToken::from(token.to_string())) {
56
- if token.expires_at.is_none_or(|expires_at| {
57
- expires_at > DateTime::<Utc>::from(SystemTime::now())
58
- }) {
+ if token
+ .expires_at
+ .is_none_or(|expires_at| expires_at > DateTime::<Utc>::from(SystemTime::now()))
59
+ {
60
Ok(TokenAuth { token })
61
} else {
62
Err(TokenAuthError::Expired)
0 commit comments