summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_exchanges.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-31 21:40:48 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-31 21:40:48 +0200
commitfde9dc80f6e6a5fe4c5856b2ed78e6c024528c43 (patch)
tree35d5e52652b38f75a5279fe855cc1d345fe3c1c5 /src/auditor/taler-auditor-httpd_exchanges.c
parent1d54400a025ff62ad15b77ab117ea5188884b1a1 (diff)
downloadexchange-fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43.tar.gz
exchange-fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43.tar.bz2
exchange-fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43.zip
-more json_pack cleaning
Diffstat (limited to 'src/auditor/taler-auditor-httpd_exchanges.c')
-rw-r--r--src/auditor/taler-auditor-httpd_exchanges.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/auditor/taler-auditor-httpd_exchanges.c b/src/auditor/taler-auditor-httpd_exchanges.c
index be627ba1c..7b54b6d49 100644
--- a/src/auditor/taler-auditor-httpd_exchanges.c
+++ b/src/auditor/taler-auditor-httpd_exchanges.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2020 Taler Systems SA
+ Copyright (C) 2014-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 published by the Free Software
@@ -45,12 +45,11 @@ add_exchange (void *cls,
json_t *list = cls;
json_t *obj;
- obj = json_pack ("{s:o, s:s}",
- "master_pub",
- GNUNET_JSON_from_data_auto (master_pub),
- "exchange_url",
- exchange_url);
- GNUNET_break (NULL != obj);
+ obj = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_data_auto ("master_pub",
+ master_pub),
+ GNUNET_JSON_pack_string ("exchange_url",
+ exchange_url));
GNUNET_break (0 ==
json_array_append_new (list,
obj));
@@ -108,10 +107,11 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh,
TALER_EC_GENERIC_DB_FETCH_FAILED,
"exchanges");
}
- return TALER_MHD_reply_json_pack (connection,
- MHD_HTTP_OK,
- "{s:o}",
- "exchanges", ja);
+ return TALER_MHD_REPLY_JSON_PACK (
+ connection,
+ MHD_HTTP_OK,
+ GNUNET_JSON_pack_array_steal ("exchanges",
+ ja));
}