Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Update web.js
Browse files Browse the repository at this point in the history
Fixes issue with server displaying online while still offline when fetching from web API with Pterodactyl enabled
  • Loading branch information
fasko-web committed Feb 16, 2021
1 parent e776a87 commit 63924aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobs/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = async (ip, port = false, api) => {
let res = await rateLimit(() => stream(api.url));
if (res.statusCode === 200) {
const body = await res.json();
if (body[api.server_id] && body[api.server_id].players.toString()) {
if (body[api.server_id] && body[api.server_id].map.toString() !== 'N/A') {
const server = body[api.server_id];
return {
state: 'on',
Expand Down

0 comments on commit 63924aa

Please sign in to comment.