diff --git a/src/api/Api.cpp b/src/api/Api.cpp index c9f0fd9ab..b29a6454d 100644 --- a/src/api/Api.cpp +++ b/src/api/Api.cpp @@ -103,6 +103,12 @@ void xmrig::Api::onConfigChanged(Config *config, Config *previousConfig) void xmrig::Api::exec(IApiRequest &request) { + if (request.method() == IApiRequest::METHOD_GET && request.url() == "/1/summary") { + request.accept(); + request.reply().AddMember("id", rapidjson::StringRef(m_id), request.doc().GetAllocator()); + request.reply().AddMember("worker_id", rapidjson::StringRef(m_workerId), request.doc().GetAllocator());; + } + for (IApiListener *listener : m_listeners) { listener->onRequest(request); diff --git a/src/api/ApiRouter.h b/src/api/ApiRouter.h index fd9baea8a..cbdc04b80 100644 --- a/src/api/ApiRouter.h +++ b/src/api/ApiRouter.h @@ -26,7 +26,7 @@ #define XMRIG_APIROUTER_H -#include "api/NetworkState.h" +#include "net/NetworkState.h" #include "base/kernel/interfaces/IControllerListener.h" #include "rapidjson/fwd.h"