summary refs log tree commit diff
path: root/src/routes/gateway.ts
diff options
context:
space:
mode:
authorPaul Munteanu <luth@luthcode.net>2021-05-28 03:39:33 +0300
committerPaul Munteanu <luth@luthcode.net>2021-05-28 03:39:33 +0300
commitc6ab039787346f0930881ad7a5893e4ea555f852 (patch)
treea115223aa7a3d95c65e3c3432dd3df49e32b9d85 /src/routes/gateway.ts
parentMerge branch 'fosscord:master' into master (diff)
parent:construction: permissions (diff)
downloadserver-c6ab039787346f0930881ad7a5893e4ea555f852.tar.xz
Merge branch 'master' of https://github.com/fosscord/fosscord-api
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..ffbbe74c 100644 --- a/src/routes/gateway.ts +++ b/src/routes/gateway.ts
@@ -1,12 +1,11 @@ +import { Config } from "@fosscord/server-util"; import { Router } from "express"; -import 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 { endpoint } = Config.get().gateway; + res.send({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" }); }); export default router;