Skip to content

Commit

Permalink
update to new gamedig
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse committed Nov 30, 2024
1 parent 0903ef7 commit 2be2a99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const http = require('http');
const express = require("express");
const app = express();
const cors = require('cors')
const Gamedig = require('gamedig');
const { GameDig } = require('gamedig');
const mcache = require('memory-cache');
const port = process.env.PORT || 3035;

Expand Down Expand Up @@ -36,7 +36,7 @@ const cache = (duration) => {

app.get("/amg/1", cache(120), (req, res, next) => {
res.set('Cache-Control', 'public, max-age=120');
Gamedig.query({
GameDig.query({
type: "forrest",
host: "157.90.7.148",
port: "10015",
Expand All @@ -49,7 +49,7 @@ app.get("/amg/1", cache(120), (req, res, next) => {

app.get("/amg/2", cache(120), (req, res, next) => {
res.set('Cache-Control', 'public, max-age=120');
Gamedig.query({
GameDig.query({
type: "rust",
host: "51.77.77.129",
port: "27030",
Expand All @@ -62,7 +62,7 @@ app.get("/amg/2", cache(120), (req, res, next) => {

app.get('/game/:gamename/:host/:port', cache(120), (req, res, next) => {
res.set('Cache-Control', 'public, max-age=120');
Gamedig.query({
GameDig.query({
type: req.params.gamename,
host: req.params.host,
port: req.params.port,
Expand Down

0 comments on commit 2be2a99

Please sign in to comment.