mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 10:22:39 +01:00
Merge pull request #952 from fosscord/dev/endpoints-in-ping
Merge /dev/endpoints-in-ping to master
This commit is contained in:
commit
fbac5c7cd7
@ -23,7 +23,7 @@ import { config } from "dotenv";
|
|||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||||
const { cdn, gateway } = Config.get();
|
const { cdn, gateway, api } = Config.get();
|
||||||
|
|
||||||
const IdentityForm = {
|
const IdentityForm = {
|
||||||
cdn: cdn.endpointPublic || process.env.CDN || "http://localhost:3001",
|
cdn: cdn.endpointPublic || process.env.CDN || "http://localhost:3001",
|
||||||
@ -31,6 +31,8 @@ router.get("/", route({}), async (req: Request, res: Response) => {
|
|||||||
gateway.endpointPublic ||
|
gateway.endpointPublic ||
|
||||||
process.env.GATEWAY ||
|
process.env.GATEWAY ||
|
||||||
"ws://localhost:3002",
|
"ws://localhost:3002",
|
||||||
|
defaultApiVersion: api.defaultVersion ?? 9,
|
||||||
|
apiEndpoint: api.endpointPublic ?? "/api",
|
||||||
};
|
};
|
||||||
|
|
||||||
res.json(IdentityForm);
|
res.json(IdentityForm);
|
||||||
|
@ -20,4 +20,5 @@ export class ApiConfiguration {
|
|||||||
defaultVersion: string = "9";
|
defaultVersion: string = "9";
|
||||||
activeVersions: string[] = ["6", "7", "8", "9"];
|
activeVersions: string[] = ["6", "7", "8", "9"];
|
||||||
useFosscordEnhancements: boolean = true;
|
useFosscordEnhancements: boolean = true;
|
||||||
|
endpointPublic: string = "/api";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user