mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 07:55:04 -05:00
Added "restricted" field to "GET /1/summary" request.
This commit is contained in:
@@ -117,9 +117,10 @@ void xmrig::Api::exec(IApiRequest &request)
|
|||||||
auto &allocator = request.doc().GetAllocator();
|
auto &allocator = request.doc().GetAllocator();
|
||||||
|
|
||||||
request.accept();
|
request.accept();
|
||||||
request.reply().AddMember("id", StringRef(m_id), allocator);
|
request.reply().AddMember("id", StringRef(m_id), allocator);
|
||||||
request.reply().AddMember("worker_id", StringRef(m_workerId), allocator);
|
request.reply().AddMember("worker_id", StringRef(m_workerId), allocator);
|
||||||
request.reply().AddMember("uptime", (Chrono::currentMSecsSinceEpoch() - m_timestamp) / 1000, allocator);
|
request.reply().AddMember("uptime", (Chrono::currentMSecsSinceEpoch() - m_timestamp) / 1000, allocator);
|
||||||
|
request.reply().AddMember("restricted", request.isRestricted(), allocator);
|
||||||
|
|
||||||
Value features(kArrayType);
|
Value features(kArrayType);
|
||||||
# ifdef XMRIG_FEATURE_API
|
# ifdef XMRIG_FEATURE_API
|
||||||
|
|||||||
@@ -27,10 +27,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdint.h>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
#include "base/kernel/interfaces/IBaseListener.h"
|
#include "base/kernel/interfaces/IBaseListener.h"
|
||||||
|
#include "base/tools/Object.h"
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
@@ -47,6 +48,8 @@ class String;
|
|||||||
class Api : public IBaseListener
|
class Api : public IBaseListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Api)
|
||||||
|
|
||||||
Api(Base *base);
|
Api(Base *base);
|
||||||
~Api() override;
|
~Api() override;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user