Skip to content

Commit

Permalink
fix: remove prod mode logic from car command controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Dec 20, 2024
1 parent 427ad42 commit c14b3ea
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scylla-server/src/controllers/car_command_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,12 @@ pub struct ConfigRequest {
pub async fn send_config_command(
Path(key): Path<String>,
Query(data_query): Query<ConfigRequest>,
Extension(client): Extension<Option<Arc<AsyncClient>>>,
Extension(client): Extension<Arc<AsyncClient>>,
) -> 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();
Expand Down

0 comments on commit c14b3ea

Please sign in to comment.