mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 21:59:50 +01:00
Enhancement: add optional token parameter for gamedig (#5245)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -12,13 +12,19 @@ export default async function gamedigProxyHandler(req, res) {
|
||||
const url = new URL(serviceWidget.url);
|
||||
|
||||
try {
|
||||
const serverData = await GameDig.query({
|
||||
const gamedigOptions = {
|
||||
type: serviceWidget.serverType,
|
||||
host: url.hostname,
|
||||
port: url.port,
|
||||
givenPortOnly: true,
|
||||
checkOldIDs: true,
|
||||
});
|
||||
};
|
||||
|
||||
if (serviceWidget.gameToken) {
|
||||
gamedigOptions.token = serviceWidget.gameToken;
|
||||
}
|
||||
|
||||
const serverData = await GameDig.query(gamedigOptions);
|
||||
|
||||
res.status(200).send({
|
||||
online: true,
|
||||
|
||||
Reference in New Issue
Block a user