diff options
author | Chris Chrome <christophercookman@gmail.com> | 2023-01-18 12:14:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 12:14:05 -0700 |
commit | 313ba7a27bb85f664a4245fe2dca9ce9ee354aeb (patch) | |
tree | 0e69ba5a6c34df5f9c04a66e7964bdac46c882de | |
parent | `npm run generate:client` downloads more assets now (Thanks Rory!). Also `ONL... (diff) | |
parent | Merge pull request #934 from fosscord/master (diff) | |
download | server-313ba7a27bb85f664a4245fe2dca9ce9ee354aeb.tar.xz |
Merge pull request #952 from fosscord/dev/endpoints-in-ping
Merge /dev/endpoints-in-ping to master
-rw-r--r-- | src/api/routes/policies/instance/domains.ts | 4 | ||||
-rw-r--r-- | src/util/config/types/ApiConfiguration.ts | 1 |
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 d51908b3..929cf65c 100644 --- a/src/api/routes/policies/instance/domains.ts +++ b/src/api/routes/policies/instance/domains.ts @@ -23,7 +23,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", @@ -31,6 +31,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 1da9f89a..0389ed3e 100644 --- a/src/util/config/types/ApiConfiguration.ts +++ b/src/util/config/types/ApiConfiguration.ts @@ -20,4 +20,5 @@ export class ApiConfiguration { defaultVersion: string = "9"; activeVersions: string[] = ["6", "7", "8", "9"]; useFosscordEnhancements: boolean = true; + endpointPublic: string = "/api"; } |