完善业务细节
This commit is contained in:
parent
9bceb8c4d9
commit
f003467909
@ -97,7 +97,7 @@ impl Account {
|
|||||||
return Ok(Some(account));
|
return Ok(Some(account));
|
||||||
}
|
}
|
||||||
Err(Error::RowNotFound) => {
|
Err(Error::RowNotFound) => {
|
||||||
return Err(Error::RowNotFound);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
tracing::error!("find_by_apple_id error: {:?}", e);
|
tracing::error!("find_by_apple_id error: {:?}", e);
|
||||||
@ -122,7 +122,7 @@ impl Account {
|
|||||||
return Ok(Some(account));
|
return Ok(Some(account));
|
||||||
}
|
}
|
||||||
Err(Error::RowNotFound) => {
|
Err(Error::RowNotFound) => {
|
||||||
return Err(Error::RowNotFound);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
tracing::error!("find_by_custom_id error: {:?}", e);
|
tracing::error!("find_by_custom_id error: {:?}", e);
|
||||||
@ -147,7 +147,7 @@ impl Account {
|
|||||||
return Ok(Some(account));
|
return Ok(Some(account));
|
||||||
}
|
}
|
||||||
Err(Error::RowNotFound) => {
|
Err(Error::RowNotFound) => {
|
||||||
return Err(Error::RowNotFound);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
tracing::error!("find_by_facebook_id error: {:?}", e);
|
tracing::error!("find_by_facebook_id error: {:?}", e);
|
||||||
|
@ -5,7 +5,7 @@ pub mod account_controller;
|
|||||||
pub mod feedback_controller;
|
pub mod feedback_controller;
|
||||||
|
|
||||||
pub fn init() -> Router {
|
pub fn init() -> Router {
|
||||||
let mut app = Router::new()
|
Router::new()
|
||||||
// 用户登录、用户管理相关路由
|
// 用户登录、用户管理相关路由
|
||||||
.typed_route(account_controller::authenticate_google)
|
.typed_route(account_controller::authenticate_google)
|
||||||
.typed_route(account_controller::authenticate_with_password)
|
.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::add_feedback)
|
||||||
.typed_route(feedback_controller::get_feedback_list_by_page)
|
.typed_route(feedback_controller::get_feedback_list_by_page)
|
||||||
// .typed_route(feedback_controller::get_feedback_list)
|
.typed_route(feedback_controller::get_feedback_list)
|
||||||
;
|
|
||||||
for (path, method_router) in feedback_controller::get_feedback_list() {
|
|
||||||
app = app.route(path, method_router);
|
|
||||||
}
|
|
||||||
app
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user