Skip to content

Commit 661fa3b

Browse files
Techbot121Meta Construct
authored andcommitted
while this works, we can require them later now
1 parent d87c68b commit 661fa3b

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

app/services/webapp/api/game-server-status.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import path from "path";
55
import pug from "pug";
66

77
export default async (webApp: WebApp): Promise<void> => {
8-
const gameBridge = await webApp.container.getService("GameBridge");
9-
108
webApp.app.get("/server-status/:id/:bruh?", async (req, res) => {
9+
const gameBridge = await webApp.container.getService("GameBridge");
1110
const server: GameServer = gameBridge.servers[req.params.id];
1211

1312
if (!server) {

app/services/webapp/api/gamemode.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import servers from "@/config/gamebridge.servers.json";
44
const HOSTING_IDS = { 3: true, 1: true };
55

66
export default async (webApp: WebApp): Promise<void> => {
7-
const bot = await webApp.container.getService("DiscordBot");
8-
97
webApp.app.get("/gamemode/:id/", async (req, res) => {
8+
const bot = await webApp.container.getService("DiscordBot");
109
const ip = req.header("x-forwarded-for")?.split(",")[0];
1110
if (!ip) return res.sendStatus(403);
1211
const isOkIp = servers.find(srv => srv.ip === ip);

app/services/webapp/api/gmod-error-handler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ const ignoreRegex = [
8585
//const fileIgnore = [];
8686

8787
export default async (webApp: WebApp): Promise<void> => {
88-
const gameBridge = await webApp.container.getService("GameBridge");
89-
9088
const webhook = new Discord.WebhookClient({
9189
url: config.webhookUrl,
9290
});
@@ -104,6 +102,7 @@ export default async (webApp: WebApp): Promise<void> => {
104102
res.status(204);
105103
res.end();
106104

105+
const gameBridge = await webApp.container.getService("GameBridge");
107106
const server = servers.find(srv => srv.ip === ip);
108107
let gameserver: GameServer;
109108
let player: Player | undefined;

app/services/webapp/api/steam-oauth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ import axios from "axios";
1818
// openid.sig=W0u5DRbtHE1GG0ZKXjerUZDUGmc=
1919

2020
export default async (webApp: WebApp): Promise<void> => {
21-
const sql = await webApp.container.getService("SQL");
22-
2321
webApp.app.get("/steam/auth/callback/:id", rateLimit(), async (req, res) => {
22+
const sql = await webApp.container.getService("SQL");
2423
const query = req.query;
2524
const userId = req.params.id;
2625
if (!userId) res.status(403).send("Missing userid for linking");

0 commit comments

Comments
 (0)