From b0e6948560606d28fa3c361c6a58bcd5fa044a8a Mon Sep 17 00:00:00 2001 From: liyunjia Date: Mon, 10 Jun 2024 21:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/Cargo.toml | 2 +- api/src/controller/account.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 }