diff --git a/Cargo.toml b/Cargo.toml index 0ef4d74..0ca1a72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://git.ewenlau.net/ewenlau/tg-archive-bot" homepage = "https://git.ewenlau.net/ewenlau/tg-archive-bot" [dependencies] -askama = "0.14" +askama = "0.16.0" axum = { version = "0.8.4", features = ["form"] } axum-extra = { version = "0.12.6", features = ["cookie"] } chrono = "0.4" @@ -19,11 +19,11 @@ dotenv = "0.15.0" ipnet = "2.12.1" poise = "0.6.2" pulldown-cmark = "0.13.4" -rand = "0.9" -reqwest = { version = "0.12", features = ["json"] } -serde = { version = "1", features = ["derive"] } +rand = "0.10.2" +reqwest = { version = "0.13.4", features = ["json", "form"] } +serde = { version = "1.0.229", features = ["derive"] } sqlx = { version = "0.9.0", features = ["postgres", "runtime-tokio", "macros"] } -tokio = { version = "1.52.3", features = ["full"] } +tokio = { version = "1.53.1", features = ["full"] } tower-sessions = "0.15" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/src/web/api.rs b/src/web/api.rs index ea3f45d..7d9c68a 100644 --- a/src/web/api.rs +++ b/src/web/api.rs @@ -7,7 +7,7 @@ use axum::{ response::{IntoResponse, Response}, routing::{get, post}, }; -use rand::{Rng, distr::Alphanumeric}; +use rand::{Rng, distr::Alphanumeric, RngExt}; use serde::{Deserialize, Serialize}; use std::{ collections::HashMap, diff --git a/src/web/auth.rs b/src/web/auth.rs index 27289b5..3966102 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -1,4 +1,5 @@ use super::*; +use rand::RngExt; pub(super) async fn timezone_request(jar: CookieJar, request: Request, next: Next) -> Response { let timezone = jar