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-27 18:15:33 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-27 18:15:33 +0200
commitb00815b025575bfe79f6f5d2d4004b8da9b9b946 (patch)
tree1d86d7767ba8f29396421ca0ed37afb892214252 /src/routes/gateway.ts
parent:bug: fix bans (diff)
parent:arrow_up: npm i @fosscord/server-util@1.3.5 (diff)
downloadserver-b00815b025575bfe79f6f5d2d4004b8da9b9b946.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;