From 4ecc220a85a278403d67900e1336948c10b0cd0b Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Sun, 9 Jul 2023 20:31:21 +0100 Subject: [PATCH] chore: try to fix logging --- src/configure.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/configure.rs b/src/configure.rs index dd9e217..c0904fb 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -95,7 +95,7 @@ fn prepare_statement<'a>(conn: &'a Conn, stat: &str) -> Result, St } fn is_configured(conn: &Conn) -> Result { - let mut stmt = prepare_statement(conn, "SELECT configured from meta")?; + let mut stmt = prepare_statement(conn, "SELECT configured from meta;")?; #[derive(Debug)] @@ -115,13 +115,14 @@ fn is_configured(conn: &Conn) -> Result { let mut version_iter = version_iter.ok().unwrap(); - if version_iter.by_ref().count() > 1 { + if version_iter.by_ref().count() != 1 { return Err(json!(ApiResponse {code: 500, message: "Change something is very wrong!".to_string()}).to_string()); } - + + println!("here!!!!"); for data in version_iter { let data = data.unwrap(); - println!("{:?}", data); + println!("here: {:?}", data); if data.configured == 1 { return Ok(true); }