diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-token-families.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-token-families.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-token-families.c b/src/backend/taler-merchant-httpd_private-post-token-families.c index 6bf048f9..b9be59d8 100644 --- a/src/backend/taler-merchant-httpd_private-post-token-families.c +++ b/src/backend/taler-merchant-httpd_private-post-token-families.c @@ -86,7 +86,7 @@ TMH_private_post_token_families (const struct TMH_RequestHandler *rh, GNUNET_JSON_spec_json ("description_i18n", &details.description_i18n), NULL), - GNUNET_JSON_spec_string("kind", &kind), + GNUNET_JSON_spec_string ("kind", &kind), GNUNET_JSON_spec_timestamp ("valid_after", &details.valid_after), GNUNET_JSON_spec_timestamp ("valid_before", @@ -113,13 +113,14 @@ TMH_private_post_token_families (const struct TMH_RequestHandler *rh, } - if (strcmp(kind, "discount") == 0) + if (strcmp (kind, "discount") == 0) details.kind = TALER_MERCHANTDB_TFK_Discount; - else if (strcmp(kind, "subscription") == 0) + else if (strcmp (kind, "subscription") == 0) details.kind = TALER_MERCHANTDB_TFK_Subscription; else { GNUNET_break (0); + GNUNET_JSON_parse_free (spec); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, @@ -194,7 +195,7 @@ TMH_private_post_token_families (const struct TMH_RequestHandler *rh, NULL, NULL, 0) - // TODO: Use proper error code + // TODO: Use proper error code : TALER_MHD_reply_with_error (connection, MHD_HTTP_CONFLICT, 0, |