summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-26 10:21:13 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-26 10:21:13 +1100
commit38c85e6c4f03d296288957c090b4533dfe2f93f5 (patch)
treeea18f628222301d52d5bf727d8066bc624a271ff
parentUse localhost:3001 as fallback when cdn endpoints are null rather than 3003 (diff)
downloadserver-38c85e6c4f03d296288957c090b4533dfe2f93f5.tar.xz
also don't use 3002 as default when gateway endpoints are null
-rw-r--r--src/api/routes/gateway/bot.ts2
-rw-r--r--src/api/routes/gateway/index.ts2
-rw-r--r--src/api/routes/policies/instance/domains.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/api/routes/gateway/bot.ts b/src/api/routes/gateway/bot.ts
index ffd58e21..070debe3 100644
--- a/src/api/routes/gateway/bot.ts
+++ b/src/api/routes/gateway/bot.ts
@@ -44,7 +44,7 @@ const options: RouteOptions = {
 router.get("/", route(options), (req: Request, res: Response) => {
 	const { endpointPublic } = Config.get().gateway;
 	res.json({
-		url: endpointPublic || process.env.GATEWAY || "ws://localhost:3002",
+		url: endpointPublic || process.env.GATEWAY || "ws://localhost:3001",
 		shards: 1,
 		session_start_limit: {
 			total: 1000,
diff --git a/src/api/routes/gateway/index.ts b/src/api/routes/gateway/index.ts
index a23c93ba..e6fcf5e3 100644
--- a/src/api/routes/gateway/index.ts
+++ b/src/api/routes/gateway/index.ts
@@ -37,7 +37,7 @@ const options: RouteOptions = {
 router.get("/", route(options), (req: Request, res: Response) => {
 	const { endpointPublic } = Config.get().gateway;
 	res.json({
-		url: endpointPublic || process.env.GATEWAY || "ws://localhost:3002",
+		url: endpointPublic || process.env.GATEWAY || "ws://localhost:3001",
 	});
 });
 
diff --git a/src/api/routes/policies/instance/domains.ts b/src/api/routes/policies/instance/domains.ts
index 33c06765..c95493b0 100644
--- a/src/api/routes/policies/instance/domains.ts
+++ b/src/api/routes/policies/instance/domains.ts
@@ -29,7 +29,7 @@ router.get("/", route({}), async (req: Request, res: Response) => {
 		gateway:
 			gateway.endpointPublic ||
 			process.env.GATEWAY ||
-			"ws://localhost:3002",
+			"ws://localhost:3001",
 		defaultApiVersion: api.defaultVersion ?? 9,
 		apiEndpoint: api.endpointPublic ?? "/api",
 	};