diff --git a/lib/src/RestApi.cpp b/lib/src/RestApi.cpp index fc5c141..8c882d0 100644 --- a/lib/src/RestApi.cpp +++ b/lib/src/RestApi.cpp @@ -6,15 +6,13 @@ using namespace std; -void RestApi::start_rest_api(WriterManager& writer_manager, uint16_t port) +void RestApi::start_rest_api(crow::SimpleApp app, WriterManager& writer_manager, uint16_t port) { #ifdef DEBUG_OUTPUT cout << "[rest_interface::start_rest_api] Starting rest interface on port " << port << endl; #endif - crow::SimpleApp app; - CROW_ROUTE(app, "/kill")([&](){ writer_manager.kill(); diff --git a/lib/src/RestApi.hpp b/lib/src/RestApi.hpp index 01c0259..5029870 100644 --- a/lib/src/RestApi.hpp +++ b/lib/src/RestApi.hpp @@ -7,7 +7,7 @@ namespace RestApi { - void start_rest_api(WriterManager& writer_manager, uint16_t port); + void start_rest_api(crow::SimpleApp app, WriterManager& writer_manager, uint16_t port); } -#endif \ No newline at end of file +#endif