修改格式
This commit is contained in:
parent
bedc8953d0
commit
b0e6948560
@ -7,7 +7,7 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = { workspace = true }
|
axum = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true, features = ["full"] }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
tower-http = { workspace = true, features = ["trace"] }
|
tower-http = { workspace = true, features = ["trace"] }
|
||||||
validator = { workspace = true }
|
validator = { workspace = true }
|
||||||
|
@ -7,7 +7,6 @@ pub async fn authenticate_google(
|
|||||||
Json(req): Json<AuthenticateGooleAccountReq>
|
Json(req): Json<AuthenticateGooleAccountReq>
|
||||||
) -> ResResult<ResData<LoginAccount>> {
|
) -> ResResult<ResData<LoginAccount>> {
|
||||||
req.validate()?;
|
req.validate()?;
|
||||||
|
|
||||||
service::account::authenticate_google(req).await
|
service::account::authenticate_google(req).await
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,7 +14,6 @@ pub async fn authenticate_with_password(
|
|||||||
Json(req): Json<AuthenticateWithPassword>
|
Json(req): Json<AuthenticateWithPassword>
|
||||||
) -> ResResult<ResData<LoginAccount>> {
|
) -> ResResult<ResData<LoginAccount>> {
|
||||||
req.validate()?;
|
req.validate()?;
|
||||||
|
|
||||||
service::sys_account::authenticate_with_password(req).await
|
service::sys_account::authenticate_with_password(req).await
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,5 +22,6 @@ pub async fn refresh_token(
|
|||||||
Json(refresh_token): Json<RefreshToken>
|
Json(refresh_token): Json<RefreshToken>
|
||||||
) -> ResResult<ResData<RefreshTokenResult>> {
|
) -> ResResult<ResData<RefreshTokenResult>> {
|
||||||
tracing::debug!("刷新token, {:?}", account);
|
tracing::debug!("刷新token, {:?}", account);
|
||||||
|
refresh_token.validate()?;
|
||||||
service::account::refresh_token(account, refresh_token.token).await
|
service::account::refresh_token(account, refresh_token.token).await
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user