From d25213b998b9367aa4d7b108319ba0549d22f523 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Tue, 27 Sep 2016 14:45:34 +0800 Subject: [PATCH] show_checkandpushtx method started --- main.cpp | 7 +++++++ src/page.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/main.cpp b/main.cpp index 39cb03b..b708e57 100644 --- a/main.cpp +++ b/main.cpp @@ -214,6 +214,13 @@ int main(int ac, const char* av[]) { return xmrblocks.show_rawtx(); }); + CROW_ROUTE(app, "/checkandpush").methods("POST"_method) + ([&](const crow::request& req) { + string rawtxdata = string(req.url_params.get("rawtxdata")); + cout << rawtxdata << endl; + return xmrblocks.show_checkandpushtx(); + }); + CROW_ROUTE(app, "/search").methods("GET"_method) ([&](const crow::request& req) { return xmrblocks.search(string(req.url_params.get("value"))); diff --git a/src/page.h b/src/page.h index 1289c4e..dcfd252 100644 --- a/src/page.h +++ b/src/page.h @@ -1528,6 +1528,12 @@ namespace xmreg { return mstch::render(full_page, context); } + string + show_checkandpushtx() + { + return {}; + } + string search(string search_text)