summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-delete-orders-ID.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-01-04 01:03:34 +0100
committerChristian Grothoff <christian@grothoff.org>2024-01-04 01:03:34 +0100
commitd2d2d773cb2cc23f198d07392bab463beb2e2e04 (patch)
tree4f8eb381f1f64d47cc3668b40889416ea35fc31f /src/backend/taler-merchant-httpd_private-delete-orders-ID.c
parent881381503f7f51b294c2740e9fcf7f28ef43f973 (diff)
downloadmerchant-d2d2d773cb2cc23f198d07392bab463beb2e2e04.tar.gz
merchant-d2d2d773cb2cc23f198d07392bab463beb2e2e04.tar.bz2
merchant-d2d2d773cb2cc23f198d07392bab463beb2e2e04.zip
remove unnecessary DB interaction in GET private/orders/ID
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-delete-orders-ID.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-delete-orders-ID.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/backend/taler-merchant-httpd_private-delete-orders-ID.c b/src/backend/taler-merchant-httpd_private-delete-orders-ID.c
index dfdb486e..cd8aa10c 100644
--- a/src/backend/taler-merchant-httpd_private-delete-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-delete-orders-ID.c
@@ -78,6 +78,8 @@ TMH_private_delete_orders_ID (const struct TMH_RequestHandler *rh,
struct TALER_MerchantPostDataHashP unused;
uint64_t order_serial;
bool paid = false;
+ bool wired = false;
+ bool matches = false;
qs = TMH_db->lookup_order (TMH_db->cls,
mi->settings.id,
@@ -87,13 +89,16 @@ TMH_private_delete_orders_ID (const struct TMH_RequestHandler *rh,
NULL);
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
- qs = TMH_db->lookup_contract_terms (TMH_db->cls,
- mi->settings.id,
- hc->infix,
- NULL,
- &order_serial,
- &paid,
- NULL);
+ qs = TMH_db->lookup_contract_terms3 (TMH_db->cls,
+ mi->settings.id,
+ hc->infix,
+ NULL,
+ NULL,
+ &order_serial,
+ &paid,
+ &wired,
+ &matches,
+ NULL);
}
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
return TALER_MHD_reply_with_error (connection,