chore: try to fix logging
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Andre Henriques 2023-07-09 20:31:21 +01:00
parent 9d76a20f9c
commit 4ecc220a85

View File

@ -95,7 +95,7 @@ fn prepare_statement<'a>(conn: &'a Conn, stat: &str) -> Result<Statement<'a>, St
} }
fn is_configured(conn: &Conn) -> Result<bool, String> { fn is_configured(conn: &Conn) -> Result<bool, String> {
let mut stmt = prepare_statement(conn, "SELECT configured from meta")?; let mut stmt = prepare_statement(conn, "SELECT configured from meta;")?;
#[derive(Debug)] #[derive(Debug)]
@ -115,13 +115,14 @@ fn is_configured(conn: &Conn) -> Result<bool, String> {
let mut version_iter = version_iter.ok().unwrap(); 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()); return Err(json!(ApiResponse {code: 500, message: "Change something is very wrong!".to_string()}).to_string());
} }
println!("here!!!!");
for data in version_iter { for data in version_iter {
let data = data.unwrap(); let data = data.unwrap();
println!("{:?}", data); println!("here: {:?}", data);
if data.configured == 1 { if data.configured == 1 {
return Ok(true); return Ok(true);
} }