Cleanup
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user