[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix #8354
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix #8354 |
Date: |
Fri, 09 Feb 2024 15:09:09 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 5cdcdfb2 fix #8354
5cdcdfb2 is described below
commit 5cdcdfb2c4728f4c0afcebaad7041677cfdffcb6
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Feb 9 11:09:00 2024 -0300
fix #8354
---
src/backend/taler-merchant-httpd_private-patch-otp-devices-ID.c | 7 +++++--
src/backenddb/pg_delete_otp.c | 2 +-
src/backenddb/pg_update_otp.c | 6 ++++--
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-patch-otp-devices-ID.c
b/src/backend/taler-merchant-httpd_private-patch-otp-devices-ID.c
index cb784b8d..596b8b09 100644
--- a/src/backend/taler-merchant-httpd_private-patch-otp-devices-ID.c
+++ b/src/backend/taler-merchant-httpd_private-patch-otp-devices-ID.c
@@ -46,8 +46,11 @@ TMH_private_patch_otp_devices_ID (const struct
TMH_RequestHandler *rh,
GNUNET_JSON_spec_uint64 ("otp_ctr",
&tp.otp_ctr),
NULL),
- TALER_JSON_spec_otp_key ("otp_key",
- (const char **) &tp.otp_key),
+ GNUNET_JSON_spec_mark_optional(
+
+ TALER_JSON_spec_otp_key ("otp_key",
+ (const char **) &tp.otp_key),
+ NULL),
GNUNET_JSON_spec_end ()
};
diff --git a/src/backenddb/pg_delete_otp.c b/src/backenddb/pg_delete_otp.c
index b4c0687d..5f011a4b 100644
--- a/src/backenddb/pg_delete_otp.c
+++ b/src/backenddb/pg_delete_otp.c
@@ -47,7 +47,7 @@ TMH_PG_delete_otp (void *cls,
" (SELECT merchant_serial "
" FROM merchant_instances"
" WHERE merchant_id=$1)"
- " AND merchant_otp_devices.template_id=$2");
+ " AND merchant_otp_devices.otp_id=$2");
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"delete_otp",
params);
diff --git a/src/backenddb/pg_update_otp.c b/src/backenddb/pg_update_otp.c
index 8f6c7176..bdcb9624 100644
--- a/src/backenddb/pg_update_otp.c
+++ b/src/backenddb/pg_update_otp.c
@@ -51,7 +51,9 @@ TMH_PG_update_otp (void *cls,
GNUNET_PQ_query_param_string (td->otp_description),
GNUNET_PQ_query_param_uint32 (&pos32),
GNUNET_PQ_query_param_uint64 (&td->otp_ctr),
- GNUNET_PQ_query_param_string (td->otp_key),
+ (NULL == td->otp_key)
+ ? GNUNET_PQ_query_param_null()
+ : GNUNET_PQ_query_param_string (td->otp_key),
GNUNET_PQ_query_param_end
};
@@ -62,7 +64,7 @@ TMH_PG_update_otp (void *cls,
" otp_description=$3"
",otp_algorithm=$4"
",otp_ctr=$5"
- ",otp_key=$6"
+ ",otp_key=COALESCE($6,otp_key)"
" WHERE merchant_serial="
" (SELECT merchant_serial"
" FROM merchant_instances"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: fix #8354,
gnunet <=