Service login #6
+2
-2
@@ -135,7 +135,7 @@ pub mod requests {
|
||||
}
|
||||
|
||||
|
||||
pub async fn login_service_user(app: &axum::Router, username: &String, passphrase: &String) -> Result<axum::response::Response, std::convert::Infallible> {
|
||||
pub async fn login_service_user(app: &axum::Router, username: &str, passphrase: &str) -> Result<axum::response::Response, std::convert::Infallible> {
|
||||
let payload = serde_json::json!({
|
||||
"username": username,
|
||||
"passphrase": passphrase,
|
||||
@@ -255,7 +255,7 @@ async fn register_service_user(app: &axum::Router,) -> Result<textsender_models:
|
||||
}
|
||||
}
|
||||
|
||||
async fn login_service_user(app: &axum::Router, username: &String, passphrase: &String) -> Result<textsender_models::token::LoginResult, std::io::Error> {
|
||||
async fn login_service_user(app: &axum::Router, username: &str, passphrase: &str) -> Result<textsender_models::token::LoginResult, std::io::Error> {
|
||||
match requests::login_service_user(&app, username, passphrase).await {
|
||||
Ok(response) => {
|
||||
if axum::http::StatusCode::OK != response.status() {
|
||||
|
||||
Reference in New Issue
Block a user