Skip to content

Commit

Permalink
Merge pull request #24 from Pugma/dev/errLog
Browse files Browse the repository at this point in the history
エラーログの追加
  • Loading branch information
Pugma authored Jul 7, 2024
2 parents 4b403d8 + d9e468e commit 441c4f8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions server/app/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ impl Api for Count {

let result = match db_result {
Ok(_) => Ok(SignUpPostResponse::Status200_Success),
_ => Ok(SignUpPostResponse::Status400_BadRequest),
Err(a) => {
println!("{}", a);
Ok(SignUpPostResponse::Status400_BadRequest)
}
};

println!("Login requested");
Expand All @@ -71,12 +74,13 @@ impl Api for Count {
})
});

let aaa = "aaaa".to_string();

let result = match db_result {
Ok(true) => Ok(LoginPostResponse::Status200_Success),
Ok(false) => Ok(LoginPostResponse::Status400_BadRequest),
_ => Err(aaa),
Err(e) => {
println!("{}", e);
Ok(LoginPostResponse::Status400_BadRequest)
}
};

Box::pin(async { result })
Expand Down

0 comments on commit 441c4f8

Please sign in to comment.