Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. var minerpage = function(req, res, next){
  2. var address = req.params.address || null;
  3.  
  4. if (address !== null){
  5. portalStats.getBalanceByAddress(address, function(){
  6. processTemplates();
  7.  
  8. res.end(indexesProcessed['miner_stats']);
  9.  
  10. });
  11. }
  12. else
  13. next();
  14. };
  15.  
  16. var payout = function(req, res, next){
  17. var address = req.params.address || null;
  18.  
  19. if (address !== null){
  20. portalStats.getPayout(address, function(data){
  21. res.write(data.toString());
  22. res.end();
  23. });
  24. }
  25. else
  26. next();
  27. };
  28.  
  29.  
  30. var shares = function(req, res, next){
  31. portalStats.getCoins(function(){
  32. processTemplates();
  33.  
  34. res.end(indexesProcessed['user_shares']);
  35.  
  36. });
  37. };
  38.  
  39. var usershares = function(req, res, next){
  40.  
  41. var coin = req.params.coin || null;
  42.  
  43. if(coin !== null){
  44. portalStats.getCoinTotals(coin, null, function(){
  45. processTemplates();
  46.  
  47. res.end(indexesProcessed['user_shares']);
  48.  
  49. });
  50. }
  51. else
  52. next();
  53. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement