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){
|
||||
switch(req.params.method){
|
||||
case 'stats':
|
||||
res.writeHead(200, { 'Content-Type: application/json' });
|
||||
res.end(portalStats.statsString);
|
||||
return;
|
||||
case 'pool_stats':
|
||||
res.writeHead(200, { 'Content-Type: application/json' });
|
||||
res.end(JSON.stringify(portalStats.statPoolHistory));
|
||||
return;
|
||||
case 'live_stats':
|
||||
@ -51,4 +53,4 @@ module.exports = function(logger, portalConfig, poolConfigs){
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user