debug
This commit is contained in:
parent
b1a66d71b9
commit
4321986204
@ -28,7 +28,7 @@ mod log;
|
|||||||
mod misc;
|
mod misc;
|
||||||
mod stat;
|
mod stat;
|
||||||
|
|
||||||
#[derive(FromForm)]
|
#[derive(FromForm, Debug)]
|
||||||
struct LoginForm<'r> {
|
struct LoginForm<'r> {
|
||||||
name: &'r str,
|
name: &'r str,
|
||||||
password: &'r str,
|
password: &'r str,
|
||||||
@ -36,6 +36,7 @@ struct LoginForm<'r> {
|
|||||||
|
|
||||||
#[post("/", data = "<login>")]
|
#[post("/", data = "<login>")]
|
||||||
async fn wikiauth(db: &State<SqlitePool>, login: Form<LoginForm<'_>>) -> String {
|
async fn wikiauth(db: &State<SqlitePool>, login: Form<LoginForm<'_>>) -> String {
|
||||||
|
println!("{login:?}");
|
||||||
match User::login(db, login.name, login.password).await {
|
match User::login(db, login.name, login.password).await {
|
||||||
Ok(_) => "SUCC".into(),
|
Ok(_) => "SUCC".into(),
|
||||||
Err(_) => "FAIL".into(),
|
Err(_) => "FAIL".into(),
|
||||||
|
Loading…
Reference in New Issue
Block a user