Skip to content

Commit

Permalink
/config API to get active config details
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Oct 6, 2022
1 parent 22544f5 commit 24f05d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tinyphone/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ void TinyPhoneHttpServer::Start() {
};
return tp::response(200, response);
});


CROW_ROUTE(app, "/config")([]() {
std::string productVersion;
GetProductVersion(productVersion);
json response = {
{ "version", productVersion },
{ "config", tp::ApplicationConfig},
{ "sip-log-file", tp::sipLogFile},
{ "http-log-file", tp::httpLogFile},
};
return tp::response(200, response);
});

std::unordered_set<crow::websocket::connection*> subscribers;

Expand Down

0 comments on commit 24f05d8

Please sign in to comment.