auth_service in config file
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Waiting to run
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Waiting to run
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Waiting to run

This commit is contained in:
wt committed 2025-02-20 17:30:48 +07:00
1 parent c24b4ef641
commit c376868513
2 files changed
+6 -3

No files matched your search

+3 -2
View File
@@ -43,5 +43,6 @@
"css": "../src/web/css",
"js": "../src/web/js",
"root": "../src/web"
}
}
},
"auth_service": "http://127.0.0.1:43243"
}
+3 -1
View File
@@ -3,10 +3,12 @@
#include <routes.hpp>
#include <json.hpp>
#include <types.hpp>
#include <config/config.hpp>
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"("})";