mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-12-02 11:54:01 +01:00
+6
-1
@@ -355,8 +355,13 @@ app.get('/miner/:address/chart/hashrate', function (req, res) {
|
|||||||
|
|
||||||
app.get('/miner/:address/chart/hashrate/allWorkers', function (req, res) {
|
app.get('/miner/:address/chart/hashrate/allWorkers', function (req, res) {
|
||||||
let address = req.params.address;
|
let address = req.params.address;
|
||||||
let identifiers = global.database.getCache(address + '_identifiers').sort();
|
let identifiers = global.database.getCache(address + '_identifiers');
|
||||||
let returnData = {global: global.database.getCache(req.params.address)['hashHistory']};
|
let returnData = {global: global.database.getCache(req.params.address)['hashHistory']};
|
||||||
|
if (identifiers !== false){
|
||||||
|
identifiers.sort();
|
||||||
|
} else {
|
||||||
|
return res.json(returnData);
|
||||||
|
}
|
||||||
let intCounter = 0;
|
let intCounter = 0;
|
||||||
identifiers.forEach(function(identifier){
|
identifiers.forEach(function(identifier){
|
||||||
returnData[identifier] = global.database.getCache(req.params.address+"_"+identifier)['hashHistory'];
|
returnData[identifier] = global.database.getCache(req.params.address+"_"+identifier)['hashHistory'];
|
||||||
|
|||||||
Reference in New Issue
Block a user