fix: webhook secret doesn't need to be base64 encoded

Closes kemitix/git-next#118
This commit is contained in:
Paul Campbell 2024-07-29 07:51:09 +01:00
parent b89431b779
commit 691a733fc3

View file

@ -39,7 +39,9 @@ async fn send_webhook(
tracing::warn!("Invalid notification configuration (config) - can't sent notification"); tracing::warn!("Invalid notification configuration (config) - can't sent notification");
return; return;
}; };
let Ok(webhook) = Webhook::new(webhook_config.secret().expose_secret()) else { let Ok(webhook) =
Webhook::from_bytes(webhook_config.secret().expose_secret().as_bytes().into())
else {
tracing::warn!("Invalid notification configuration (signer) - can't sent notification"); tracing::warn!("Invalid notification configuration (signer) - can't sent notification");
return; return;
}; };