Skip to content

Commit

Permalink
Chore: update Gamedig (gethomepage#3841)
Browse files Browse the repository at this point in the history
Co-Authored-By: shamoon <[email protected]>
  • Loading branch information
teooko and shamoon committed Aug 12, 2024
1 parent 805f119 commit 2aa7a38
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
44 changes: 22 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"compare-versions": "^6.1.0",
"dockerode": "^4.0.2",
"follow-redirects": "^1.15.6",
"gamedig": "^4.3.1",
"gamedig": "^5.1.1",
"i18next": "^21.10.0",
"js-yaml": "^4.1.0",
"json-rpc-2.0": "^1.7.0",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/widgets/gamedig/proxy.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import { GameDig } from "gamedig";

import createLogger from "utils/logger";
import getServiceWidget from "utils/config/service-helpers";

const proxyName = "gamedigProxyHandler";
const logger = createLogger(proxyName);
const gamedig = require("gamedig");

export default async function gamedigProxyHandler(req, res) {
const { group, service } = req.query;
const serviceWidget = await getServiceWidget(group, service);
const url = new URL(serviceWidget.url);

try {
const serverData = await gamedig.query({
const serverData = await GameDig.query({
type: serviceWidget.serverType,
host: url.hostname,
port: url.port,
givenPortOnly: true,
checkOldIDs: true,
});

res.status(200).send({
Expand Down

0 comments on commit 2aa7a38

Please sign in to comment.