mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-04-26 16:46:31 +00:00
it works again
This commit is contained in:
parent
848c930292
commit
ddd9ff273e
@ -235,6 +235,8 @@ include_directories(
|
||||
|
||||
"dNet"
|
||||
|
||||
"dWeb"
|
||||
|
||||
"tests"
|
||||
"tests/dCommonTests"
|
||||
"tests/dGameTests"
|
||||
|
@ -6,17 +6,13 @@ set(DCHATSERVER_SOURCES
|
||||
"ChatWeb.cpp"
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${PROJECT_SOURCE_DIR}/dWeb
|
||||
)
|
||||
|
||||
add_executable(ChatServer "ChatServer.cpp")
|
||||
target_include_directories(ChatServer PRIVATE "${PROJECT_SOURCE_DIR}/dChatFilter")
|
||||
target_include_directories(ChatServer PRIVATE "${PROJECT_SOURCE_DIR}/dChatFilter" "${PROJECT_SOURCE_DIR}/dWeb")
|
||||
add_compile_definitions(ChatServer PRIVATE PROJECT_VERSION="\"${PROJECT_VERSION}\"")
|
||||
|
||||
add_library(dChatServer ${DCHATSERVER_SOURCES})
|
||||
target_include_directories(dChatServer PRIVATE "${PROJECT_SOURCE_DIR}/dServer")
|
||||
|
||||
target_link_libraries(dChatServer ${COMMON_LIBRARIES} dChatFilter)
|
||||
target_link_libraries(ChatServer ${COMMON_LIBRARIES} dChatFilter dChatServer dServer mongoose dWeb)
|
||||
target_link_libraries(ChatServer ${COMMON_LIBRARIES} dChatFilter dChatServer dServer dWeb)
|
||||
|
||||
|
@ -99,7 +99,7 @@ void HandleWSUnsubscribe(mg_connection* connection, json data) {
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterRoutes() {
|
||||
void ChatWeb::RegisterRoutes() {
|
||||
// REST API v1 routes
|
||||
std::string v1_route = "/api/v1/";
|
||||
Game::web.RegisterHTTPRoute({
|
||||
|
@ -4,4 +4,4 @@ set(DWEB_SOURCES
|
||||
add_library(dWeb STATIC ${DWEB_SOURCES})
|
||||
|
||||
target_include_directories(dWeb PUBLIC ".")
|
||||
target_link_libraries(dWeb dCommon)
|
||||
target_link_libraries(dWeb dCommon mongoose)
|
||||
|
@ -7,6 +7,9 @@
|
||||
#include "GeneralUtils.h"
|
||||
#include "JSONUtils.h"
|
||||
|
||||
namespace Game {
|
||||
Web web;
|
||||
}
|
||||
|
||||
namespace {
|
||||
const char * json_content_type = "application/json";
|
||||
|
@ -8,7 +8,10 @@
|
||||
#include "json_fwd.hpp"
|
||||
#include "eHTTPStatusCode.h"
|
||||
|
||||
|
||||
class Web;
|
||||
namespace Game {
|
||||
extern Web web;
|
||||
}
|
||||
|
||||
enum class eHTTPMethod;
|
||||
|
||||
@ -49,8 +52,4 @@ private:
|
||||
mg_mgr mgr;
|
||||
};
|
||||
|
||||
namespace Game {
|
||||
Web web;
|
||||
}
|
||||
|
||||
#endif // !__WEB_H__
|
||||
|
Loading…
x
Reference in New Issue
Block a user