add skip_webhook parameter to obtain-async

This commit is contained in:
Jędrzej Stuczyński
2024-12-02 14:42:57 +00:00
parent bd158e6160
commit 875da2d010
4 changed files with 11 additions and 2 deletions
Generated
+1 -1
View File
@@ -5093,7 +5093,7 @@ dependencies = [
[[package]]
name = "nym-credential-proxy"
version = "0.1.5"
version = "0.1.6"
dependencies = [
"anyhow",
"async-trait",
@@ -268,6 +268,9 @@ pub struct WebhookTicketbookWalletSharesRequest {
pub struct TicketbookObtainQueryParams {
pub output: Option<Output>,
#[serde(default)]
pub skip_webhook: bool,
pub include_master_verification_key: bool,
pub include_coin_index_signatures: bool,
@@ -1,6 +1,6 @@
[package]
name = "nym-credential-proxy"
version = "0.1.5"
version = "0.1.6"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
@@ -357,6 +357,7 @@ pub(crate) async fn try_obtain_blinded_ticketbook_async(
params: TicketbookObtainQueryParams,
pending: BlindedShares,
) {
let skip_webhook = params.skip_webhook;
if let Err(err) = try_obtain_blinded_ticketbook_async_inner(
&state,
request,
@@ -367,6 +368,11 @@ pub(crate) async fn try_obtain_blinded_ticketbook_async(
)
.await
{
if skip_webhook {
info!(uuid = %request,"the webhook is not going to be called for this request");
return;
}
// post to the webhook to notify of errors on this side
if let Err(webhook_err) = try_trigger_webhook_request_for_error(
&state,