summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 11:42:28 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 11:43:16 +0200
commit42d323d4344c748e1e793a606646c932d998cb47 (patch)
tree555a858ae9be73da5a0421c5af8926fb2b9d1735 /src/backend/taler-merchant-httpd_private-post-products-ID-lock.c
parent9b6cc730772c7b1c193236cf809f63d908237447 (diff)
downloadmerchant-42d323d4344c748e1e793a606646c932d998cb47.tar.gz
merchant-42d323d4344c748e1e793a606646c932d998cb47.tar.bz2
merchant-42d323d4344c748e1e793a606646c932d998cb47.zip
implement #6942: switch UUIDs to strings
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-products-ID-lock.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-products-ID-lock.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c b/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c
index 0fae6023..7fc7b0ac 100644
--- a/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c
+++ b/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2020 Taler Systems SA
+ (C) 2020, 2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -35,12 +35,13 @@ TMH_private_post_products_ID_lock (const struct TMH_RequestHandler *rh,
struct TMH_MerchantInstance *mi = hc->instance;
const char *product_id = hc->infix;
enum GNUNET_DB_QueryStatus qs;
+ const char *uuids;
struct GNUNET_Uuid uuid;
uint32_t quantity;
struct GNUNET_TIME_Relative duration;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_fixed_auto ("lock_uuid",
- &uuid), // FIXME: use string?
+ GNUNET_JSON_spec_string ("lock_uuid",
+ &uuids),
TALER_JSON_spec_relative_time ("duration",
&duration),
GNUNET_JSON_spec_uint32 ("quantity",
@@ -61,7 +62,8 @@ TMH_private_post_products_ID_lock (const struct TMH_RequestHandler *rh,
? MHD_YES
: MHD_NO;
}
-
+ TMH_uuid_from_string (uuids,
+ &uuid);
qs = TMH_db->lock_product (TMH_db->cls,
mi->settings.id,
product_id,