summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/api/routes/policies/instance/domains.ts4
-rw-r--r--src/util/config/types/ApiConfiguration.ts1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/api/routes/policies/instance/domains.ts b/src/api/routes/policies/instance/domains.ts
index f22eac17..0acecb9a 100644
--- a/src/api/routes/policies/instance/domains.ts
+++ b/src/api/routes/policies/instance/domains.ts
@@ -5,7 +5,7 @@ import { config } from "dotenv";
 const router = Router();
 
 router.get("/", route({}), async (req: Request, res: Response) => {
-	const { cdn, gateway } = Config.get();
+	const { cdn, gateway, api } = Config.get();
 
 	const IdentityForm = {
 		cdn: cdn.endpointPublic || process.env.CDN || "http://localhost:3001",
@@ -13,6 +13,8 @@ router.get("/", route({}), async (req: Request, res: Response) => {
 			gateway.endpointPublic ||
 			process.env.GATEWAY ||
 			"ws://localhost:3002",
+		defaultApiVersion: api.defaultVersion ?? 9,
+		apiEndpoint: api.endpointPublic ?? "/api",
 	};
 
 	res.json(IdentityForm);
diff --git a/src/util/config/types/ApiConfiguration.ts b/src/util/config/types/ApiConfiguration.ts
index 442a5986..64d9e6d7 100644
--- a/src/util/config/types/ApiConfiguration.ts
+++ b/src/util/config/types/ApiConfiguration.ts
@@ -2,4 +2,5 @@ export class ApiConfiguration {
 	defaultVersion: string = "9";
 	activeVersions: string[] = ["6", "7", "8", "9"];
 	useFosscordEnhancements: boolean = true;
+	endpointPublic: string = "/api";
 }