diff --git a/api/Cargo.toml b/api/Cargo.toml index 635f661..7bc052e 100644 --- a/api/Cargo.toml +++ b/api/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] axum = { workspace = true } -tokio = { workspace = true } +tokio = { workspace = true, features = ["full"] } tracing = { workspace = true } tower-http = { workspace = true, features = ["trace"] } validator = { workspace = true } diff --git a/api/src/controller/account.rs b/api/src/controller/account.rs index e848551..613efd5 100644 --- a/api/src/controller/account.rs +++ b/api/src/controller/account.rs @@ -7,7 +7,6 @@ pub async fn authenticate_google( Json(req): Json ) -> ResResult> { req.validate()?; - service::account::authenticate_google(req).await } @@ -15,7 +14,6 @@ pub async fn authenticate_with_password( Json(req): Json ) -> ResResult> { req.validate()?; - service::sys_account::authenticate_with_password(req).await } @@ -24,5 +22,6 @@ pub async fn refresh_token( Json(refresh_token): Json ) -> ResResult> { tracing::debug!("刷新token, {:?}", account); + refresh_token.validate()?; service::account::refresh_token(account, refresh_token.token).await }