aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_exchanges.c
diff options
context:
space:
mode:
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 @@
1/* 1/*
2 This file is part of TALER 2 This file is part of TALER
3 Copyright (C) 2014-2020 Taler Systems SA 3 Copyright (C) 2014-2021 Taler Systems SA
4 4
5 TALER is free software; you can redistribute it and/or modify it under the 5 TALER is free software; you can redistribute it and/or modify it under the
6 terms of the GNU Affero General Public License as published by the Free Software 6 terms of the GNU Affero General Public License as published by the Free Software
@@ -45,12 +45,11 @@ add_exchange (void *cls,
45 json_t *list = cls; 45 json_t *list = cls;
46 json_t *obj; 46 json_t *obj;
47 47
48 obj = json_pack ("{s:o, s:s}", 48 obj = GNUNET_JSON_PACK (
49 "master_pub", 49 GNUNET_JSON_pack_data_auto ("master_pub",
50 GNUNET_JSON_from_data_auto (master_pub), 50 master_pub),
51 "exchange_url", 51 GNUNET_JSON_pack_string ("exchange_url",
52 exchange_url); 52 exchange_url));
53 GNUNET_break (NULL != obj);
54 GNUNET_break (0 == 53 GNUNET_break (0 ==
55 json_array_append_new (list, 54 json_array_append_new (list,
56 obj)); 55 obj));
@@ -108,10 +107,11 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh,
108 TALER_EC_GENERIC_DB_FETCH_FAILED, 107 TALER_EC_GENERIC_DB_FETCH_FAILED,
109 "exchanges"); 108 "exchanges");
110 } 109 }
111 return TALER_MHD_reply_json_pack (connection, 110 return TALER_MHD_REPLY_JSON_PACK (
112 MHD_HTTP_OK, 111 connection,
113 "{s:o}", 112 MHD_HTTP_OK,
114 "exchanges", ja); 113 GNUNET_JSON_pack_array_steal ("exchanges",
114 ja));
115} 115}
116 116
117 117