use sync decrypt

This commit is contained in:
Ruben Fiszel
2025-01-31 10:31:19 +01:00
parent e726013369
commit dc00a13501
4 changed files with 9 additions and 22 deletions

View File

@@ -23,7 +23,7 @@ use windmill_common::{
error::{self, Error},
jobs::JobKind,
scripts::ScriptHash,
variables::{build_crypt, decrypt_value_with_mc},
variables::{build_crypt, decrypt},
};
#[derive(Deserialize, Debug)]
@@ -853,7 +853,7 @@ async fn get_slack_token(db: &DB, slack_resource_path: &str, w_id: &str) -> anyh
if slack_token.is_secret {
let mc = build_crypt(&db, w_id).await?;
let bot_token = decrypt_value_with_mc(slack_token.value, mc).await?;
let bot_token = decrypt(&mc, slack_token.value)?;
Ok(bot_token)
} else {
Ok(slack_token.value)