This commit is contained in:
2026-05-25 17:43:07 +02:00
parent d1576ae8fa
commit e2cfb61caa
11 changed files with 56 additions and 85 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ pub fn encode_token(header: &Header, id: String, key: &EncodingKey) -> String {
expires: expires as usize,
};
let token = encode(header, &claims, key);
return token.expect("token return failed");
token.expect("token return failed")
}
/// Decodes and validates a JSON Web Token (JWT).
@@ -77,5 +77,5 @@ pub fn decode_token(token: String, key: &DecodingKey) -> Result<Claims, (StatusC
(StatusCode::UNAUTHORIZED, Json(error))
})?
.claims;
return Ok(claims);
Ok(claims)
}