From c75d01f539081e4a16d86545491b580c7632b24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Sverre=20Lien=20Sell=C3=A6g?= Date: Sat, 22 May 2021 18:49:30 +0200 Subject: [PATCH] add route to see orders --- src/store.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/store.cpp b/src/store.cpp index 6515341..f4b4130 100644 --- a/src/store.cpp +++ b/src/store.cpp @@ -46,6 +46,13 @@ int Application::run() { [&]() { https_server->start(secure_web_server_started); }); } + http_server.resource["^/orders/?$"]["GET"] = + [&](std::shared_ptr response, ...) { + response->write(Status::success_ok, dat.dump(), + {header_access_control, header_application_data}); + }; + + servers.emplace_back([&]() { http_server.start(web_server_started); }); for (auto &server : servers) {