commit 7513c512f23a286a60c991cc6295e53d6b35e550
parent 9f4dbbb26583a066f16854638cceecaa4d29276c
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 2 Nov 2023 22:30:11 +0100
/info endpoint must wrap raw response data
Diffstat:
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/challenger/challenger-httpd_info.c b/src/challenger/challenger-httpd_info.c
@@ -111,12 +111,17 @@ CH_handler_info (struct CH_HandlerContext *hc,
mret = TALER_MHD_REPLY_JSON_PACK (
hc->connection,
MHD_HTTP_OK,
- GNUNET_JSON_pack_string ("address",
- address),
- GNUNET_JSON_pack_string ("address_type",
- CH_address_type),
- GNUNET_JSON_pack_timestamp ("expires",
- address_expiration));
+ GNUNET_JSON_pack_string ("status",
+ "success"),
+ GNUNET_JSON_pack_object_steal (
+ "data",
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("address",
+ address),
+ GNUNET_JSON_pack_string ("address_type",
+ CH_address_type),
+ GNUNET_JSON_pack_timestamp ("expires",
+ address_expiration))));
GNUNET_free (address);
return mret;
}
diff --git a/src/challenger/challenger-httpd_token.c b/src/challenger/challenger-httpd_token.c
@@ -469,7 +469,6 @@ CH_handler_token (struct CH_HandlerContext *hc,
break;
}
-
return TALER_MHD_REPLY_JSON_PACK (
hc->connection,
MHD_HTTP_OK,