commit a825bb0be9022fe73668480dc4038c0526f2e429
parent 3a038f23f69d8c80de38df37905cad9510afa3fa
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
Date: Tue, 12 Mar 2024 09:53:26 +0100
[lib] parse missing charity url
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/lib/donau_api_charity_get.c b/src/lib/donau_api_charity_get.c
@@ -77,6 +77,7 @@ handle_charity_get_ok (const json_t *resp_obj,
{
struct DONAU_Charity *charity = &gcresp->details.ok.charity;
const char *name;
+ const char *url;
if (JSON_OBJECT != json_typeof (resp_obj))
{
GNUNET_break_op (0);
@@ -87,6 +88,7 @@ handle_charity_get_ok (const json_t *resp_obj,
GNUNET_JSON_spec_fixed_auto ("charity_pub",
&charity->charity_pub),
GNUNET_JSON_spec_string ("name", &name),
+ GNUNET_JSON_spec_string ("url", &url),
TALER_JSON_spec_amount_any ("max_per_year",
&charity->max_per_year),
TALER_JSON_spec_amount_any ("receipts_to_date",
@@ -106,6 +108,7 @@ handle_charity_get_ok (const json_t *resp_obj,
return GNUNET_SYSERR;
}
charity->name = GNUNET_strdup (name);
+ charity->charity_url = GNUNET_strdup (url);
cgh->cb (cgh->cb_cls,
gcresp);