From eaba4dae4f2d8b2df64edb6c4e307c4473a4693c Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Mon, 9 May 2016 05:53:33 +0000 Subject: [PATCH] readme updated --- README.md | 9 +++++++-- main.cpp | 7 ++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 69c71b9..8487d63 100644 --- a/README.md +++ b/README.md @@ -127,8 +127,13 @@ int main(int ac, const char* av[]) { return xmrblocks.show_tx(tx_hash, with_ring_signatures); }); - CROW_ROUTE(app, "/myoutputs///") - ([&](string tx_hash, string xmr_address, string viewkey) { + CROW_ROUTE(app, "/myoutputs").methods("GET"_method) + ([&](const crow::request& req) { + + string tx_hash = string(req.url_params.get("tx_hash")); + string xmr_address = string(req.url_params.get("xmr_address")); + string viewkey = string(req.url_params.get("viewkey")); + return xmrblocks.show_my_outputs(tx_hash, xmr_address, viewkey); }); diff --git a/main.cpp b/main.cpp index cb55bfc..6b498fa 100644 --- a/main.cpp +++ b/main.cpp @@ -100,16 +100,13 @@ int main(int ac, const char* av[]) { return xmrblocks.show_tx(tx_hash, with_ring_signatures); }); -// CROW_ROUTE(app, "/myoutputs///") -// ([&](string tx_hash, string xmr_address, string viewkey) { -// return xmrblocks.show_my_outputs(tx_hash, xmr_address, viewkey); -// }); - CROW_ROUTE(app, "/myoutputs").methods("GET"_method) ([&](const crow::request& req) { + string tx_hash = string(req.url_params.get("tx_hash")); string xmr_address = string(req.url_params.get("xmr_address")); string viewkey = string(req.url_params.get("viewkey")); + return xmrblocks.show_my_outputs(tx_hash, xmr_address, viewkey); });