mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Added "restricted" field to "GET /1/summary" request.
This commit is contained in:
parent
838f078fa5
commit
0f367ab117
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue