summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_admin.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-26 16:38:59 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-26 16:38:59 +0200
commitc0451f0982bdb565f431417cea3ab0238342d125 (patch)
tree4a27b418a74acd0fa5d6bb789818ced43c4832d5 /src/exchange/taler-exchange-httpd_admin.c
parent3f468773e71b68e9ceb5431e797941b1cc086e68 (diff)
downloadexchange-c0451f0982bdb565f431417cea3ab0238342d125.tar.gz
exchange-c0451f0982bdb565f431417cea3ab0238342d125.tar.bz2
exchange-c0451f0982bdb565f431417cea3ab0238342d125.zip
fix #4533 for exchange (breaks interaction with bank for /admin/add/incoming)
Diffstat (limited to 'src/exchange/taler-exchange-httpd_admin.c')
-rw-r--r--src/exchange/taler-exchange-httpd_admin.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_admin.c b/src/exchange/taler-exchange-httpd_admin.c
index 6b28e9cc1..618a76583 100644
--- a/src/exchange/taler-exchange-httpd_admin.c
+++ b/src/exchange/taler-exchange-httpd_admin.c
@@ -114,13 +114,15 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh,
struct TALER_ReservePublicKeyP reserve_pub;
struct TALER_Amount amount;
struct GNUNET_TIME_Absolute at;
- json_t *wire;
+ json_t *sender_account_details;
+ json_t *transfer_details;
json_t *root;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("reserve_pub", &reserve_pub),
TALER_JSON_spec_amount ("amount", &amount),
GNUNET_JSON_spec_absolute_time ("execution_date", &at),
- GNUNET_JSON_spec_json ("wire", &wire),
+ GNUNET_JSON_spec_json ("sender_account_details", &sender_account_details),
+ GNUNET_JSON_spec_json ("transfer_details", &transfer_details),
GNUNET_JSON_spec_end ()
};
int res;
@@ -148,19 +150,20 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh,
return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES;
}
if (GNUNET_YES !=
- TMH_json_validate_wireformat (wire,
+ TMH_json_validate_wireformat (sender_account_details,
GNUNET_NO))
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
return TMH_RESPONSE_reply_arg_unknown (connection,
- "wire");
+ "sender_account_details");
}
res = TMH_DB_execute_admin_add_incoming (connection,
&reserve_pub,
&amount,
at,
- wire);
+ sender_account_details,
+ transfer_details);
GNUNET_JSON_parse_free (spec);
return res;
}