Re-added auto migrations

This commit is contained in:
Dennis Brentjes
2023-03-30 17:08:44 +02:00
parent 70ae15f655
commit 1296f363af
4 changed files with 126 additions and 20 deletions

View File

@@ -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(),