summary refs log tree commit diff
path: root/src/routes/gateway.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-23 20:48:25 +0200
committerGitHub <noreply@github.com>2021-05-23 20:48:25 +0200
commite1f0eb3c2a0b302641b0b88afcd8d29d85821a2c (patch)
tree29c5d85351363f7f189a61e2da52c214e597c0dd /src/routes/gateway.ts
parentMerge pull request #146 from luth31/upstream (diff)
parentFix: No more type casting required, rather take the gernics (diff)
downloadserver-e1f0eb3c2a0b302641b0b88afcd8d29d85821a2c.tar.xz
Merge pull request #147 from DiegoMagdaleno/master
New way to do config no more hardcoded localhost
Diffstat (limited to 'src/routes/gateway.ts')
-rw-r--r--src/routes/gateway.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/routes/gateway.ts b/src/routes/gateway.ts

index 5b6a87e7..04ab1248 100644 --- a/src/routes/gateway.ts +++ b/src/routes/gateway.ts
@@ -1,12 +1,11 @@ import { Router } from "express"; -import Config from "../util/Config"; +import * as Config from "../util/Config" const router = Router(); router.get("/", (req, res) => { - const endpoint = Config.getAll()?.gateway?.endpoint; - - res.send({ url: endpoint || "ws://localhost:3002" }); + const { gateway } = Config.apiConfig.getAll(); + res.send({ url: gateway || "ws://localhost:3002" }); }); export default router;