1
0
mirror of synced 2025-01-31 12:03:46 +01:00

fix: Change network interface port to 31337

This commit is contained in:
WerWolv 2023-05-16 11:01:59 +02:00
parent 636ed0095d
commit a758676b0d

View File

@ -19,7 +19,7 @@ namespace hex::plugin::builtin {
std::this_thread::yield();
return;
}
static wolv::net::SocketServer networkInterfaceServer(51337);
static wolv::net::SocketServer networkInterfaceServer(31337);
networkInterfaceServer.accept([](auto, const std::vector<u8> &data) -> std::vector<u8> {
nlohmann::json result;
@ -28,7 +28,7 @@ namespace hex::plugin::builtin {
const auto &endpoints = ContentRegistry::CommunicationInterface::impl::getNetworkEndpoints();
if (auto callback = endpoints.find(json["endpoint"].get<std::string>()); callback != endpoints.end()) {
auto responseData = callback->second(json["data"]);
auto responseData = callback->second(json.contains("data") ? json["data"] : nlohmann::json::object());
result["status"] = "success";
result["data"] = responseData;