some hot fixes
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled

This commit is contained in:
wt committed 2025-02-08 18:37:21 +07:00
1 parent 84733a2644
commit ad266d0332
23 files changed
+1126 -1067

No files matched your search

+3 -4
View File
@@ -1,5 +1,4 @@
#include <auth/auth.hpp>
#include <sstream>
#include <httplib.h>
#include <routes.hpp>
#include <json.hpp>
@@ -9,9 +8,9 @@ bool authenticate(const std::string &token)
{
httplib::Client cli(AUTH_SERVICE);
std::stringstream body;
body << R"({"token":")" << token << R"("})";
httplib::Result res = cli.Post("/api/access", body.str(), JSON_TYPE);
std::string body = R"({"token":")" + token + R"("})";
// body << R"({"token":")" << token << R"("})";
httplib::Result res = cli.Post("/api/access", body, JSON_TYPE);
if (res->status == httplib::OK_200)
{
nlohmann::json resjson = nlohmann::json::parse(res->body);