Remove printouts
This commit is contained in:
parent
ef0e9f16b8
commit
ac3a21f3f0
@ -24,11 +24,7 @@ pub fn routes(core: Core) -> Router {
|
||||
"/api/v1/health",
|
||||
get({
|
||||
let core = core.clone();
|
||||
move || async {
|
||||
let result = healthcheck(core).await;
|
||||
println!("status: {:?}", String::from_utf8(result.to_owned()));
|
||||
result
|
||||
}
|
||||
move || healthcheck(core)
|
||||
})
|
||||
.layer(
|
||||
CorsLayer::new()
|
||||
@ -40,11 +36,7 @@ pub fn routes(core: Core) -> Router {
|
||||
"/api/v1/auth",
|
||||
post({
|
||||
let core = core.clone();
|
||||
move |req: Json<AuthRequest>| wrap_handler(|| async {
|
||||
let password_result = check_password(core, req).await;
|
||||
println!("check_auth result: {:?}", password_result);
|
||||
password_result
|
||||
})
|
||||
move |req: Json<AuthRequest>| wrap_handler(|| check_password(core, req))
|
||||
})
|
||||
.layer(
|
||||
CorsLayer::new()
|
||||
@ -142,7 +134,15 @@ mod test {
|
||||
let password_exp = Utc::now() + Duration::from_secs(5);
|
||||
let memory_db: Option<PathBuf> = None;
|
||||
let conn = DbConn::new(memory_db);
|
||||
let _admin_id = conn.create_user("admin", "aoeu", true, AccountState::PasswordReset(password_exp)).await.unwrap();
|
||||
let _admin_id = conn
|
||||
.create_user(
|
||||
"admin",
|
||||
"aoeu",
|
||||
true,
|
||||
AccountState::PasswordReset(password_exp),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
let core = Core::new(FsAssets::new(PathBuf::from("/home/savanni/Pictures")), conn);
|
||||
let app = routes(core.clone());
|
||||
let server = TestServer::new(app).unwrap();
|
||||
@ -316,7 +316,6 @@ mod test {
|
||||
.await;
|
||||
response.assert_status_ok();
|
||||
let session_id = assert_matches!(response.json(), Some(AuthResponse::PasswordReset(session_id)) => session_id);
|
||||
println!("it_returns_user_profile: {}", session_id);
|
||||
|
||||
let response = server
|
||||
.get("/api/v1/user")
|
||||
|
Loading…
Reference in New Issue
Block a user