API does not set the proper header
This commit is contained in:
parent
de0b5eb1cd
commit
d130958050
@ -15,9 +15,11 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
|||||||
this.handleApiRequest = function(req, res, next){
|
this.handleApiRequest = function(req, res, next){
|
||||||
switch(req.params.method){
|
switch(req.params.method){
|
||||||
case 'stats':
|
case 'stats':
|
||||||
|
res.writeHead(200, { 'Content-Type: application/json' });
|
||||||
res.end(portalStats.statsString);
|
res.end(portalStats.statsString);
|
||||||
return;
|
return;
|
||||||
case 'pool_stats':
|
case 'pool_stats':
|
||||||
|
res.writeHead(200, { 'Content-Type: application/json' });
|
||||||
res.end(JSON.stringify(portalStats.statPoolHistory));
|
res.end(JSON.stringify(portalStats.statPoolHistory));
|
||||||
return;
|
return;
|
||||||
case 'live_stats':
|
case 'live_stats':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user