diff --git a/domain/src/entities/account.rs b/domain/src/entities/account.rs index 32f1d99..5c5277a 100644 --- a/domain/src/entities/account.rs +++ b/domain/src/entities/account.rs @@ -97,7 +97,7 @@ impl Account { return Ok(Some(account)); } Err(Error::RowNotFound) => { - return Err(Error::RowNotFound); + return Ok(None); } Err(e) => { tracing::error!("find_by_apple_id error: {:?}", e); @@ -122,7 +122,7 @@ impl Account { return Ok(Some(account)); } Err(Error::RowNotFound) => { - return Err(Error::RowNotFound); + return Ok(None); } Err(e) => { tracing::error!("find_by_custom_id error: {:?}", e); @@ -147,7 +147,7 @@ impl Account { return Ok(Some(account)); } Err(Error::RowNotFound) => { - return Err(Error::RowNotFound); + return Ok(None); } Err(e) => { tracing::error!("find_by_facebook_id error: {:?}", e); diff --git a/server/src/controller/mod.rs b/server/src/controller/mod.rs index 63ccd36..87770fa 100644 --- a/server/src/controller/mod.rs +++ b/server/src/controller/mod.rs @@ -5,7 +5,7 @@ pub mod account_controller; pub mod feedback_controller; pub fn init() -> Router { - let mut app = Router::new() + Router::new() // 用户登录、用户管理相关路由 .typed_route(account_controller::authenticate_google) .typed_route(account_controller::authenticate_with_password) @@ -13,10 +13,5 @@ pub fn init() -> Router { // 反馈相关路由 .typed_route(feedback_controller::add_feedback) .typed_route(feedback_controller::get_feedback_list_by_page) - // .typed_route(feedback_controller::get_feedback_list) - ; - for (path, method_router) in feedback_controller::get_feedback_list() { - app = app.route(path, method_router); - } - app + .typed_route(feedback_controller::get_feedback_list) }