chore: fix last commit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a2f407655e
commit
099261247e
@ -88,6 +88,7 @@ fn get_conn(db: &State<DBPool>) -> Result<Conn, String> {
|
||||
fn prepare_statement<'a>(conn: &'a Conn, stat: &str) -> Result<Statement<'a>, String> {
|
||||
let stmt = conn.prepare(stat);
|
||||
if stmt.is_err() || stmt.as_ref().ok().is_none() {
|
||||
println!("stmt: {}", stat);
|
||||
return Err(get_error_message("Could not construct statetment"));
|
||||
}
|
||||
let stmt: Statement<'a> = stmt.unwrap();
|
||||
@ -142,7 +143,7 @@ pub async fn get_configure(db: &State<DBPool>) -> String {
|
||||
return get_error_message("Not yet configured");
|
||||
}
|
||||
|
||||
let stmt = prepare_statement(&conn, "SELECT id ledcount directionX directionY directionZ tags from configuration;");
|
||||
let stmt = prepare_statement(&conn, "SELECT id, ledcount, directionX, directionY, directionZ, tags from configuration;");
|
||||
if let Err(e) = stmt {
|
||||
return e;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user