Skip to content

Commit

Permalink
fix: re-include integration values in integration-get endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
humbertoyusta authored and olegklimov committed Dec 16, 2024
1 parent 99e938f commit 89d8179
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/integrations/setting_up_integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,15 @@ pub async fn integration_config_get(
match integration_box.integr_settings_apply(&j) {
Ok(_) => {
let common_settings = integration_box.integr_common();
result.integr_values = integration_box.integr_settings_as_json();
result.integr_values["available"]["on_your_laptop"] = common_settings.available.on_your_laptop.into();
result.integr_values["available"]["when_isolated"] = common_settings.available.when_isolated.into();
result.integr_values["confirmation"]["ask_user"] = common_settings.confirmation.ask_user.into();
result.integr_values["confirmation"]["deny"] = common_settings.confirmation.deny.into();
}
Err(err) => {
tracing::error!("cannot deserialize some fields in the integration cfg correctly: `{err}`. Use default empty values instead");
result.integr_values = integration_box.integr_settings_as_json();
result.integr_values["available"]["on_your_laptop"] = false.into();
result.integr_values["available"]["when_isolated"] = false.into();
result.integr_values["confirmation"]["ask_user"] = Vec::<String>::new().into();
Expand Down

0 comments on commit 89d8179

Please sign in to comment.