From d5859d0c7ebc4e3f3201dcc6c20fae0863870843 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Mon, 10 Jul 2023 11:49:54 +0100 Subject: [PATCH] chore: update field name --- src/configure.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure.rs b/src/configure.rs index 54c41fe..8058b43 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -9,7 +9,7 @@ use crate::DBPool; #[serde(crate = "rocket::serde")] #[serde(rename_all = "camelCase")] pub struct LightConfiguration { - number: u32, + ledcount: u32, direction_x: u32, direction_y: u32, direction_z: u32, @@ -54,7 +54,7 @@ pub async fn configure(data: Json, db: &State let stmt = conn.execute( "INSERT INTO configuration (ledcount, directionX, directionY, directionZ, tags) VALUES (?1, ?2, ?3, ?4, ?5);", - (light.number, light.direction_x, light.direction_y, light.direction_z, tags)); + (light.ledcount, light.direction_x, light.direction_y, light.direction_z, tags)); if stmt.is_err() || stmt.as_ref().ok().is_none() { return json!(ApiResponse {code: 500, message: format!("Clould not configure. Err: 5, {:?}", stmt)}).to_string();