[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: inline locations as per#6566
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: inline locations as per#6566 |
Date: |
Sat, 05 Sep 2020 00:57:22 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 3e6e6fe inline locations as per#6566
3e6e6fe is described below
commit 3e6e6feb9e17f8511f3422ce79917bb2f1677d59
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Sep 5 00:57:20 2020 +0200
inline locations as per#6566
---
.../taler-merchant-httpd_private-post-orders.c | 38 ++++------------------
1 file changed, 7 insertions(+), 31 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c
b/src/backend/taler-merchant-httpd_private-post-orders.c
index fd9c8ce..05bbade 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -775,9 +775,6 @@ patch_order (struct MHD_Connection *connection,
}
else
{
- const char *mj = NULL;
- const char *ma = NULL;
- json_t *locations;
json_t *jmerchant;
jmerchant = json_object ();
@@ -790,55 +787,34 @@ patch_order (struct MHD_Connection *connection,
json_object_set_new (jmerchant,
"instance",
json_string (settings->id)));
- locations = json_object_get (order,
- "locations");
- if (NULL != locations)
{
json_t *loca;
- json_t *locj;
/* Handle merchant address */
loca = settings->address;
if (NULL != loca)
{
loca = json_deep_copy (loca);
- ma = STANDARD_LABEL_MERCHANT_ADDRESS;
- GNUNET_assert (0 ==
- json_object_set_new (locations,
- ma,
- loca));
GNUNET_assert (0 ==
json_object_set_new (jmerchant,
"address",
- json_string (ma)));
+ loca));
}
+ }
+ {
+ json_t *locj;
/* Handle merchant jurisdiction */
locj = settings->jurisdiction;
if (NULL != locj)
{
- if ( (NULL != loca) &&
- (1 == json_equal (locj,
- loca)) )
- {
- /* addresses equal, re-use */
- mj = ma;
- }
- else
- {
- locj = json_deep_copy (locj);
- mj = STANDARD_LABEL_MERCHANT_JURISDICTION;
- GNUNET_assert (0 ==
- json_object_set_new (locations,
- mj,
- locj));
- }
+ locj = json_deep_copy (locj);
GNUNET_assert (0 ==
json_object_set_new (jmerchant,
"jurisdiction",
- json_string (mj)));
+ locj));
}
- } /* have locations */
+ }
GNUNET_assert (0 ==
json_object_set_new (order,
"merchant",
--
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: inline locations as per#6566,
gnunet <=