移除无用代码
This commit is contained in:
parent
b1b64558fe
commit
0a40e7ebbc
@ -1,21 +1,18 @@
|
|||||||
use axum::Json;
|
use axum::Json;
|
||||||
use axum_extra::extract::WithRejection;
|
|
||||||
use domain::dto::account::{AuthenticateGooleAccountReq, AuthenticateWithPassword};
|
use domain::dto::account::{AuthenticateGooleAccountReq, AuthenticateWithPassword};
|
||||||
use library::resp::{rejection::IRejection, response::{ ResData, ResResult}};
|
use library::resp::response::{ ResData, ResResult};
|
||||||
use validator::Validate;
|
use validator::Validate;
|
||||||
|
|
||||||
pub async fn authenticate_google(
|
pub async fn authenticate_google(
|
||||||
WithRejection(Json(req), _): IRejection<Json<AuthenticateGooleAccountReq>>
|
Json(req): Json<AuthenticateGooleAccountReq>
|
||||||
) -> ResResult<ResData<()>> {
|
) -> ResResult<ResData<(String, String)>> {
|
||||||
req.validate()?;
|
req.validate()?;
|
||||||
|
|
||||||
service::account::authenticate_google(req).await?;
|
service::account::authenticate_google(req).await
|
||||||
|
|
||||||
Ok(ResData::none())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn authenticate_with_password(
|
pub async fn authenticate_with_password(
|
||||||
WithRejection(Json(req), _): IRejection<Json<AuthenticateWithPassword>>
|
Json(req): Json<AuthenticateWithPassword>
|
||||||
) -> ResResult<ResData<(String, String)>> {
|
) -> ResResult<ResData<(String, String)>> {
|
||||||
req.validate()?;
|
req.validate()?;
|
||||||
|
|
||||||
|
@ -1,21 +1,17 @@
|
|||||||
use axum::extract::Query;
|
use axum::extract::Query;
|
||||||
use axum::Json;
|
use axum::Json;
|
||||||
use axum_extra::extract::WithRejection;
|
|
||||||
use validator::Validate;
|
use validator::Validate;
|
||||||
use domain::dto::feedback::FeedbackAdd;
|
use domain::dto::feedback::FeedbackAdd;
|
||||||
use domain::dto::pageable::PageParams;
|
use domain::dto::pageable::PageParams;
|
||||||
use domain::entities::feedback::Feedback;
|
use domain::entities::feedback::Feedback;
|
||||||
use library::resp::pageable::Pageable;
|
use library::resp::pageable::Pageable;
|
||||||
use library::resp::rejection::IRejection;
|
use library::resp::response::{ResData, ResResult};
|
||||||
use library::resp::response::{ResErr, ResData, ResResult};
|
|
||||||
|
|
||||||
/// 添加反馈信息
|
/// 添加反馈信息
|
||||||
pub async fn add_feedback(
|
pub async fn add_feedback(
|
||||||
WithRejection(Json(req), _): IRejection<Json<FeedbackAdd>>
|
Json(req): Json<FeedbackAdd>
|
||||||
) -> ResResult<ResData<()>> {
|
) -> ResResult<ResData<()>> {
|
||||||
if let Err(err) = req.validate() {
|
req.validate()?;
|
||||||
return Err(ResErr::ErrParams(Some(err.to_string())));
|
|
||||||
}
|
|
||||||
|
|
||||||
service::feedback::add_feedback(req).await
|
service::feedback::add_feedback(req).await
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,9 @@ struct ApplePublicKey {
|
|||||||
n: String,
|
n: String,
|
||||||
kty: String,
|
kty: String,
|
||||||
#[serde(rename = "use")]
|
#[serde(rename = "use")]
|
||||||
|
#[allow(unused)]
|
||||||
use_: String,
|
use_: String,
|
||||||
|
#[allow(unused)]
|
||||||
alg: String,
|
alg: String,
|
||||||
kid: String,
|
kid: String,
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,9 @@ struct GooglePublicKey {
|
|||||||
n: String,
|
n: String,
|
||||||
kty: String,
|
kty: String,
|
||||||
#[serde(rename = "use")]
|
#[serde(rename = "use")]
|
||||||
|
#[allow(unused)]
|
||||||
use_: String,
|
use_: String,
|
||||||
|
#[allow(unused)]
|
||||||
alg: String,
|
alg: String,
|
||||||
kid: String,
|
kid: String,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user