mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-03 17:40:13 +00:00
Revert id and worker_id.
This commit is contained in:
parent
bd6c7c64aa
commit
d8aba7da7d
2 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue