升级依赖版本

This commit is contained in:
李运家 2025-03-09 10:57:10 +08:00
parent fe5dd45cfd
commit be5c596a1d
9 changed files with 364 additions and 497 deletions

817
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -18,11 +18,11 @@ i18n = { path = "i18n" }
[workspace.dependencies]
tokio = "1.43"
axum = "0.7.9"
axum = "0.8.1"
tracing = "0.1"
tower-http = "0.6.2"
validator = "0.18.1"
axum-extra = "0.9"
validator = "0.20.0"
axum-extra = "0.10.0"
serde = "1.0"
sqlx = "0.8"
sqlx-postgres = "0.8"
@ -31,7 +31,7 @@ once_cell = "1.20"
tracing-appender = "0.2"
tracing-subscriber = "0.3"
chrono = "0.4"
thiserror = "1.0"
thiserror = "2.0.12"
ulid = "1.1"
serde_json = "1.0"
http = "1.2"
@ -48,18 +48,18 @@ mimalloc = "0.1.43"
tokio-cron-scheduler = "0.13.0"
hmac = "0.12.1"
sha2 = "0.10.8"
hex-literal = "0.4.1"
hex-literal = "1.0.0"
proc-macro2 = "1.0.92"
syn = "2.0.96"
quote = "1.0.38"
hyper = "1.5.2"
tower = "0.5.2"
csv = "1.3.1"
strum = "0.26.3"
strum_macros = "0.26.4"
strum = "0.27.1"
strum_macros = "0.27.1"
hex = "0.4.3"
redis = "0.27.6"
deadpool-redis = "0.18.0"
redis = "0.29.1"
deadpool-redis = "0.20.0"
chrono-tz = "0.10.0"
inventory = "0.3.17"
oauth2 = "5.0.0"

View File

@ -20,8 +20,8 @@ expires = 1800
refresh_expires = 3600
[redis]
#url = "47.95.198.7:33000"
url = "127.0.0.1:33001"
url = "47.95.198.7:33000"
# url = "127.0.0.1:33001"
password = "3aB7kRt9pDf1nQzW"
db = 0

View File

@ -1,9 +1,6 @@
use axum::{
async_trait,
extract::{
use axum::extract::{
rejection::{FormRejection, JsonRejection},
FromRequest, Request,
},
};
use http::header::CONTENT_TYPE;
use i18n::{message, message_ids::MessageId};
@ -13,7 +10,6 @@ use crate::{context::Context, model::response::ResErr};
pub struct JsonBody<T>(pub T);
#[async_trait]
impl<S, T> FromRequest<S> for JsonBody<T>
where
axum::Json<T>: FromRequest<S, Rejection = JsonRejection>,

View File

@ -1,9 +1,8 @@
use axum::{async_trait, extract::FromRequestParts};
use axum::extract::FromRequestParts;
use http::request::Parts;
use crate::{context::Context, model::response::ResErr};
#[async_trait]
impl<S> FromRequestParts<S> for Context
where
S: Send + Sync,

View File

@ -1,7 +1,4 @@
use axum::{
async_trait,
extract::{path::ErrorKind, rejection::PathRejection, FromRequestParts},
};
use axum::extract::{path::ErrorKind, rejection::PathRejection, FromRequestParts};
use http::request::Parts;
use i18n::{message, message_ids::MessageId};
use serde::de::DeserializeOwned;
@ -10,7 +7,6 @@ use crate::{context::Context, model::response::ResErr};
pub struct PathVar<T>(pub T);
#[async_trait]
impl<S, T> FromRequestParts<S> for PathVar<T>
where
T: DeserializeOwned + Send,

View File

@ -1,5 +1,4 @@
use axum::{
async_trait,
body::Body,
extract::{FromRequest, FromRequestParts, Query},
};
@ -11,7 +10,6 @@ use crate::{context::Context, model::response::ResErr};
pub struct QueryParams<T>(pub T);
#[async_trait]
impl<S, T> FromRequest<S> for QueryParams<T>
where
S: Send + Sync,

View File

@ -32,7 +32,7 @@ pub async fn get_feedback_list_by_page(
.await
}
#[route("/feedback/:page/:pageSize", method = ["get", "post"])]
#[route("/feedback/{page}/{pageSize}", method = ["get", "post"])]
pub async fn get_feedback_list(
context: Context,
PathVar(page_params): PathVar<PageParams>,

View File

@ -67,5 +67,6 @@ fn init() -> Router {
}
pub async fn hello(context: Context) -> String {
tracing::info!("hello");
message!(context.get_lang_tag(), MessageId::Hello, "川岳").to_string()
}