Minor fixes

This commit is contained in:
2018-01-10 14:53:41 +01:00
parent d8f7755490
commit b9f6994d31
3 changed files with 37 additions and 18 deletions
+7 -2
View File
@@ -8,6 +8,11 @@ using namespace std;
void start_rest_api(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")([&](){
@@ -15,7 +20,7 @@ void start_rest_api(WriterManager& writer_manager, uint16_t port)
crow::json::wvalue result;
result["status"] = "Writer killed.";
result["status"] = "killed";
app.stop();
@@ -78,6 +83,6 @@ void start_rest_api(WriterManager& writer_manager, uint16_t port)
}
});
app.loglevel(crow::LogLevel::INFO);
app.loglevel(crow::LogLevel::ERROR);
app.port(port).run();
}