Added "restricted" field to "GET /1/summary" request.

This commit is contained in:
XMRig 2019-09-26 17:29:24 +07:00
parent 838f078fa5
commit 0f367ab117
2 changed files with 8 additions and 4 deletions

View file

@ -117,9 +117,10 @@ void xmrig::Api::exec(IApiRequest &request)
auto &allocator = request.doc().GetAllocator();
request.accept();
request.reply().AddMember("id", StringRef(m_id), allocator);
request.reply().AddMember("worker_id", StringRef(m_workerId), allocator);
request.reply().AddMember("uptime", (Chrono::currentMSecsSinceEpoch() - m_timestamp) / 1000, allocator);
request.reply().AddMember("id", StringRef(m_id), allocator);
request.reply().AddMember("worker_id", StringRef(m_workerId), allocator);
request.reply().AddMember("uptime", (Chrono::currentMSecsSinceEpoch() - m_timestamp) / 1000, allocator);
request.reply().AddMember("restricted", request.isRestricted(), allocator);
Value features(kArrayType);
# ifdef XMRIG_FEATURE_API