This commit is contained in:
acx
2024-08-11 09:25:09 +00:00
parent e25c1b5ceb
commit 21a6b91139
13 changed files with 466 additions and 7 deletions

View File

@@ -25,10 +25,10 @@ pub async fn add_user(app_state: crate::AppState, username: String, password: St
.get_result::<i64>(conn)
})
.await
.map_err(|res| {
.map_err(|_res| {
()
})?
.map_err(|res| {
.map_err(|_res| {
()
})?;
println!("ret {}", res);
@@ -50,10 +50,10 @@ pub async fn add_user(app_state: crate::AppState, username: String, password: St
.get_result(conn)
})
.await
.map_err(|e| {
.map_err(|_e| {
()
})?
.map_err(|e| {
.map_err(|_e| {
()
})?;
let out = json!(add_res);
@@ -72,7 +72,7 @@ pub async fn check_user_psw(app_state: crate::AppState, username: String, passwo
});
let conn = match conn_res {
Ok(res) => res,
Err(err) => { return false; }
Err(_err) => { return false; }
};
// 1. get psw hash
let query_username = username.clone();