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
18 lines
364 B
C++
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
|