chore: update field name
	
		
			
	
		
	
	
		
	
		
			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
							
								
									c363190f83
								
							
						
					
					
						commit
						d5859d0c7e
					
				@ -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<LightConfigurationRequest>, db: &State<DBPool>
 | 
			
		||||
 | 
			
		||||
        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();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user