http: flags

This commit is contained in:
Benedek László 2024-05-17 19:26:45 +02:00
parent 4c263ccc87
commit 59cbf02075
3 changed files with 1 additions and 10 deletions

View File

@ -2,5 +2,5 @@ find_package(nlohmann_json 3 REQUIRED)
file(GLOB_RECURSE HTTP_SOURCES "./*.cpp") file(GLOB_RECURSE HTTP_SOURCES "./*.cpp")
add_library(http SHARED ${HTTP_SOURCES}) add_library(http SHARED ${HTTP_SOURCES})
target_link_libraries(http librum.a libflags-cpp.a nlohmann_json::nlohmann_json) target_link_libraries(http librum.so libflags-cpp.so nlohmann_json::nlohmann_json)
set_target_properties(http PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") set_target_properties(http PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")

View File

@ -56,9 +56,6 @@ int run() {
}); });
server->add_path<POST>("/add", [](const Request& req, Response& resp) { server->add_path<POST>("/add", [](const Request& req, Response& resp) {
std::cout << (std::string)req << std::endl;
// std::cout << req.get_body() << std::endl;
try { try {
json data = json::parse(req.get_body()); json data = json::parse(req.get_body());
if (!data.contains("chart") || !data["chart"].is_number_integer() || !data.contains("series") || !data["series"].is_string() || if (!data.contains("chart") || !data["chart"].is_number_integer() || !data.contains("series") || !data["series"].is_string() ||

View File

@ -8,12 +8,6 @@ file(GLOB_RECURSE SERVER_UI "*.ui")
file(GLOB_RECURSE SERVER_RES "*.qrc") file(GLOB_RECURSE SERVER_RES "*.qrc")
file(GLOB_RECURSE SERVER_HEADERS "../../../inc/graph/server/*.h") file(GLOB_RECURSE SERVER_HEADERS "../../../inc/graph/server/*.h")
# cmake_print_variables(SERVER_SOURCES)
# cmake_print_variables(SERVER_UI)
# cmake_print_variables(SERVER_RES)
# cmake_print_variables(SERVER_HEADERS)
# cmake_print_variables(CMAKE_BINARY_DIR)
qt_wrap_cpp(SERVER_GEN_SRC ${SERVER_SRC}) qt_wrap_cpp(SERVER_GEN_SRC ${SERVER_SRC})
qt_wrap_ui(SERVER_GEN_UI ${SERVER_UI}) qt_wrap_ui(SERVER_GEN_UI ${SERVER_UI})