summary refs log tree commit diff
path: root/src/routes/gateway.ts
diff options
context:
space:
mode:
authorDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-19 20:39:31 -0500
committerDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-19 20:39:31 -0500
commite3f6a29df79865ae9a0d842ba5d59a2851894081 (patch)
tree079b93be825cae82a66912c61d38a5fbb28f87be /src/routes/gateway.ts
parentConfig: Start working on the config refactor (diff)
downloadserver-e3f6a29df79865ae9a0d842ba5d59a2851894081.tar.xz
Config: First rewrite of config and working implementation of getting values
Diffstat (limited to '')
-rw-r--r--src/routes/gateway.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/routes/gateway.ts b/src/routes/gateway.ts

index b6c8f49f..f92053e5 100644 --- a/src/routes/gateway.ts +++ b/src/routes/gateway.ts
@@ -1,11 +1,12 @@ 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; - res.send({ url: endpoint || "ws://localhost:3002" }); + const generalConfig = Config.apiConfig.get('gateway', 'ws://localhost:3002') as Config.DefaultOptions; + const { gateway } = generalConfig; + res.send({ url: gateway || "ws://localhost:3002" }); }); export default router;