diff --git a/config.json b/config.json index 2774c6d..a08a57d 100644 --- a/config.json +++ b/config.json @@ -43,5 +43,6 @@ "css": "../src/web/css", "js": "../src/web/js", "root": "../src/web" - } -} \ No newline at end of file + }, + "auth_service": "http://127.0.0.1:43243" +} diff --git a/src/auth/auth.cpp b/src/auth/auth.cpp index 9540906..ece2d52 100644 --- a/src/auth/auth.cpp +++ b/src/auth/auth.cpp @@ -3,10 +3,12 @@ #include #include #include +#include bool authenticate(const std::string &token) { - httplib::Client cli(AUTH_SERVICE); + config::config.setConfig("../config.json") + httplib::Client cli(config::config.getConfig()["auth_service"]); std::string body = R"({"token":")" + token + R"("})"; // body << R"({"token":")" << token << R"("})";