Revert id and worker_id.

This commit is contained in:
XMRig
2019-03-30 20:46:08 +07:00
parent bd6c7c64aa
commit d8aba7da7d
2 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -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"