Files
openrouter/src/helpers.hpp
T
wt f4bcead439
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
formated code
2025-02-13 19:25:56 +07:00

18 lines
364 B
C++

#ifndef HELPERS_HPP
#define HELPERS_HPP
#include <httplib.h>
#include <json.hpp>
static bool check_body(const httplib::Request& request)
{
if (request.body.empty())
return false;
nlohmann::json json_body = nlohmann::json::parse(request.body);
if (json_body["token"] == nullptr)
return false;
return true;
}
#endif // HELPERS_HPP