Skip to content

Commit

Permalink
dep: downgrade http and reqwest to avoid using multiple versions …
Browse files Browse the repository at this point in the history
…of `http`
  • Loading branch information
simongoricar committed Mar 21, 2024
1 parent d230434 commit 2598fba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ itertools = "0.12.1"
argon2 = "0.5.3"
jsonwebtoken = "9.2.0"
chrono = "0.4.35"
http = "1.1.0"
http = "0.2.11"
mime = "0.3.17"
uuid = { version = "1.8.0", features = ["v7"] }
httpdate = "1.0.3"
futures-util = "0.3.30"
paste = "1.0.14"
bytes = "1.5.0"

reqwest = "0.12.0"
reqwest = "0.11.24"
tantivy = "0.21.1"
slotmap = "1.0.7"

Expand Down
9 changes: 6 additions & 3 deletions kolomoni/src/api/v1/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,16 @@ pub async fn login(
let access_token_claims = JWTClaims::create(
logged_in_user.id,
Utc::now(),
Duration::days(1),
// PANIC SAFETY: 1 is a valid number of days.
Duration::try_days(1).unwrap(),
JWTTokenType::Access,
);

let refresh_token_claims = JWTClaims::create(
logged_in_user.id,
Utc::now(),
Duration::days(7),
// PANIC SAFETY: 7 is a valid number of days.
Duration::try_days(7).unwrap(),
JWTTokenType::Refresh,
);

Expand Down Expand Up @@ -296,7 +298,8 @@ pub async fn refresh_login(
let access_token_claims = JWTClaims::create(
refresh_token_claims.user_id,
Utc::now(),
Duration::days(1),
// PANIC SAFETY: 1 is a valid number of days.
Duration::try_days(1).unwrap(),
JWTTokenType::Access,
);
let access_token = state
Expand Down

0 comments on commit 2598fba

Please sign in to comment.