From a3935408b5d45dee2bc6b73e2030de54a76ddcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=90=E5=AE=B6?= Date: Tue, 1 Oct 2024 17:24:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4XXX=5Fextractor=E5=8C=85?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/src/{validator => extractor}/body_extractor.rs | 0 library/src/{validator => extractor}/context_extractor.rs | 0 library/src/{validator => extractor}/mod.rs | 0 library/src/{validator => extractor}/path_extractor.rs | 0 library/src/{validator => extractor}/query_extractor.rs | 0 library/src/lib.rs | 3 ++- library/src/router.rs | 0 server/src/controller/account_controller.rs | 2 +- server/src/controller/feedback_controller.rs | 4 ++-- 9 files changed, 5 insertions(+), 4 deletions(-) rename library/src/{validator => extractor}/body_extractor.rs (100%) rename library/src/{validator => extractor}/context_extractor.rs (100%) rename library/src/{validator => extractor}/mod.rs (100%) rename library/src/{validator => extractor}/path_extractor.rs (100%) rename library/src/{validator => extractor}/query_extractor.rs (100%) create mode 100644 library/src/router.rs diff --git a/library/src/validator/body_extractor.rs b/library/src/extractor/body_extractor.rs similarity index 100% rename from library/src/validator/body_extractor.rs rename to library/src/extractor/body_extractor.rs diff --git a/library/src/validator/context_extractor.rs b/library/src/extractor/context_extractor.rs similarity index 100% rename from library/src/validator/context_extractor.rs rename to library/src/extractor/context_extractor.rs diff --git a/library/src/validator/mod.rs b/library/src/extractor/mod.rs similarity index 100% rename from library/src/validator/mod.rs rename to library/src/extractor/mod.rs diff --git a/library/src/validator/path_extractor.rs b/library/src/extractor/path_extractor.rs similarity index 100% rename from library/src/validator/path_extractor.rs rename to library/src/extractor/path_extractor.rs diff --git a/library/src/validator/query_extractor.rs b/library/src/extractor/query_extractor.rs similarity index 100% rename from library/src/validator/query_extractor.rs rename to library/src/extractor/query_extractor.rs diff --git a/library/src/lib.rs b/library/src/lib.rs index 0c49982..9d7bb66 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -9,4 +9,5 @@ pub mod cache; pub mod context; pub mod task; pub mod utils; -pub mod validator; \ No newline at end of file +pub mod extractor; +pub mod router; \ No newline at end of file diff --git a/library/src/router.rs b/library/src/router.rs new file mode 100644 index 0000000..e69de29 diff --git a/server/src/controller/account_controller.rs b/server/src/controller/account_controller.rs index 344b50a..29e493a 100644 --- a/server/src/controller/account_controller.rs +++ b/server/src/controller/account_controller.rs @@ -1,5 +1,5 @@ use domain::{dto::account::{AuthenticateGooleAccountReq, AuthenticateWithPassword, RefreshToken}, vo::account::{LoginAccount, RefreshTokenResult}}; -use library::{context::Context, model::response::ResResult, validator::body_extractor::JsonBody}; +use library::{context::Context, model::response::ResResult, extractor::body_extractor::JsonBody}; use crate::service; diff --git a/server/src/controller/feedback_controller.rs b/server/src/controller/feedback_controller.rs index 9ee21c8..173168d 100644 --- a/server/src/controller/feedback_controller.rs +++ b/server/src/controller/feedback_controller.rs @@ -3,8 +3,8 @@ use domain::dto::pageable::PageParams; use domain::vo::feedback::FeedbackPageable; use library::context::Context; use library::model::response::ResResult; -use library::validator::body_extractor::JsonBody; -use library::validator::query_extractor::QueryParams; +use library::extractor::body_extractor::JsonBody; +use library::extractor::query_extractor::QueryParams; use crate::service;