Added API endpoint "GET /1/config".
This commit is contained in:
parent
341557c34e
commit
8d4d1a3285
3 changed files with 74 additions and 49 deletions
|
@ -89,6 +89,17 @@ void ApiRouter::ApiRouter::get(const xmrig::HttpRequest &req, xmrig::HttpReply &
|
|||
rapidjson::Document doc;
|
||||
doc.SetObject();
|
||||
|
||||
if (req.match("/1/config")) {
|
||||
if (req.isRestricted()) {
|
||||
reply.status = 403;
|
||||
return;
|
||||
}
|
||||
|
||||
m_controller->config()->getJSON(doc);
|
||||
|
||||
return finalize(reply, doc);
|
||||
}
|
||||
|
||||
getIdentify(doc);
|
||||
getMiner(doc);
|
||||
getHashrate(doc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue