Change type of function parameter

This commit is contained in:
2026-06-11 17:18:19 -04:00
parent a6d70e3155
commit a1cfaa2809
+2 -2
View File
@@ -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() {