From ac3a21f3f0d6bdd402f8448f041a32db8466084a Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Mon, 20 Jan 2025 19:51:04 -0500 Subject: [PATCH] Remove printouts --- visions/server/src/routes.rs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/visions/server/src/routes.rs b/visions/server/src/routes.rs index 430bca6..f51d13b 100644 --- a/visions/server/src/routes.rs +++ b/visions/server/src/routes.rs @@ -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| wrap_handler(|| async { - let password_result = check_password(core, req).await; - println!("check_auth result: {:?}", password_result); - password_result - }) + move |req: Json| 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 = 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")