Payment Update

Moving payment timers into the database
Adding the last payment timer cycle to the stats
This commit is contained in:
Alexander Blair
2017-02-26 10:20:11 -08:00
parent 194ca829f5
commit 3fab1673ff
3 changed files with 24 additions and 6 deletions
+3 -2
View File
@@ -75,7 +75,8 @@ app.get('/pool/stats', function (req, res) {
let localCache = global.database.getCache('pool_stats_global');
delete(localCache.minerHistory);
delete(localCache.hashHistory);
res.json({pool_list: pool_list, pool_statistics: localCache});
let lastPayment = global.database.getCache('lastPaymentCycle');
res.json({pool_list: pool_list, pool_statistics: localCache, last_payment: !lastPayment ? 0 : lastPayment});
});
app.get('/pool/chart/hashrate', function (req, res) {
@@ -601,7 +602,7 @@ adminRoutes.get('/stats', function (req, res) {
});
return callback(null);
}
], function (err) {
], function () {
return res.json(intCache);
});
});