Update api.js

Fix : #554
This commit is contained in:
IeM 2018-01-31 11:50:51 -08:00 committed by Matthew Little
parent d130958050
commit 0ea18d0d66

View File

@ -15,11 +15,11 @@ module.exports = function(logger, portalConfig, poolConfigs){
this.handleApiRequest = function(req, res, next){
switch(req.params.method){
case 'stats':
res.writeHead(200, { 'Content-Type: application/json' });
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(portalStats.statsString);
return;
case 'pool_stats':
res.writeHead(200, { 'Content-Type: application/json' });
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(portalStats.statPoolHistory));
return;
case 'live_stats':