summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_get_template.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-12-29 14:47:17 +0100
committerChristian Grothoff <christian@grothoff.org>2022-12-29 14:47:17 +0100
commit2c19f6a6fb180f059fcaeb193dd387c4d6af21b1 (patch)
treed7fdd874e84950510f5a7a698007023ed46d80ea /src/lib/merchant_api_get_template.c
parent689bbc7a201067815cb0975703422854099d19ba (diff)
downloadmerchant-2c19f6a6fb180f059fcaeb193dd387c4d6af21b1.tar.gz
merchant-2c19f6a6fb180f059fcaeb193dd387c4d6af21b1.tar.bz2
merchant-2c19f6a6fb180f059fcaeb193dd387c4d6af21b1.zip
-towards fixing the template tests
Diffstat (limited to 'src/lib/merchant_api_get_template.c')
-rw-r--r--src/lib/merchant_api_get_template.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/merchant_api_get_template.c b/src/lib/merchant_api_get_template.c
index 23c35d8b..bced4097 100644
--- a/src/lib/merchant_api_get_template.c
+++ b/src/lib/merchant_api_get_template.c
@@ -74,8 +74,8 @@ struct TALER_MERCHANT_TemplateGetHandle
*/
static void
handle_get_template_finished (void *cls,
- long response_code,
- const void *response)
+ long response_code,
+ const void *response)
{
struct TALER_MERCHANT_TemplateGetHandle *tgh = cls;
const json_t *json = response;
@@ -93,14 +93,16 @@ handle_get_template_finished (void *cls,
case MHD_HTTP_OK:
{
const char *template_description;
- const char *image;
+ const char *image = NULL;
json_t *template_contract;
bool rst_ok = true;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("template_description",
&template_description),
- GNUNET_JSON_spec_string ("image",
- &image),
+ GNUNET_JSON_spec_mark_optional (
+ GNUNET_JSON_spec_string ("image",
+ &image),
+ NULL),
GNUNET_JSON_spec_json ("template_contract",
&template_contract),
GNUNET_JSON_spec_end ()