diff --git a/scylla-server/src/controllers/car_command_controller.rs b/scylla-server/src/controllers/car_command_controller.rs index ad3d12c4..7c6cece7 100644 --- a/scylla-server/src/controllers/car_command_controller.rs +++ b/scylla-server/src/controllers/car_command_controller.rs @@ -26,17 +26,12 @@ pub struct ConfigRequest { pub async fn send_config_command( Path(key): Path, Query(data_query): Query, - Extension(client): Extension>>, + Extension(client): Extension>, ) -> Result<(), ScyllaError> { info!( "Sending car config with key: {}, and values: {:?}", key, data_query.data ); - // disable scylla if not prod, as there will be None mqtt client - let Some(client) = client else { - warn!("Cannot use config endpoint in dev mode!"); - return Ok(()); - }; // the protobuf calypso converts into CAN let mut payload = CommandData::new(); diff --git a/scylla-server/src/mqtt_processor.rs b/scylla-server/src/mqtt_processor.rs index 2255b6a5..8509dc26 100644 --- a/scylla-server/src/mqtt_processor.rs +++ b/scylla-server/src/mqtt_processor.rs @@ -235,11 +235,9 @@ impl MqttProcessor { return None; }; - // get the node and datatype from the topic extracted at the beginning + // get the node from the topic extracted at the beginning let node = split.0; - let data_type = String::from(topic); - // extract the unix time // levels of time priority // - A: The time packaged in the protobuf, to microsecond precision @@ -301,7 +299,7 @@ impl MqttProcessor { Some(ClientData { run_id: crate::RUN_ID.load(Ordering::Relaxed), - name: data_type, + name: topic.to_string(), unit: data.unit, values: data.values, timestamp: unix_clean,