forked from Roflin/gamenight
Re-added auto migrations
This commit is contained in:
@@ -26,8 +26,6 @@ fn get_claims(req: &HttpRequest) -> Result<Claims, ApiError> {
|
||||
message: "JWT-token was not specified in the Authorization header as Bearer: token".to_string()
|
||||
})?;
|
||||
|
||||
println!("{:?}", token);
|
||||
|
||||
let secret = "secret";
|
||||
Ok(decode::<Claims>(token.as_str(), &DecodingKey::from_secret(secret.as_bytes()), &Validation::default())?.claims)
|
||||
}
|
||||
@@ -38,8 +36,6 @@ pub fn get_token(user: &User) -> Result<String, ApiError> {
|
||||
uid: user.id,
|
||||
};
|
||||
|
||||
println!("{:?}", claims);
|
||||
|
||||
let secret = "secret";
|
||||
Ok(encode(
|
||||
&Header::default(),
|
||||
|
||||
Reference in New Issue
Block a user