summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-01-14 19:55:19 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-01-14 19:55:19 +0100
commit754d8dbf64fc242edca3696bf5627e83c150f2bb (patch)
tree7371adf5284abe8b6c5d73dc87578c208073e1c5 /src/api
parentUpdate openapi (diff)
downloadserver-754d8dbf64fc242edca3696bf5627e83c150f2bb.tar.xz
Add basic info in ping
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/ping.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/api/routes/ping.ts b/src/api/routes/ping.ts
index 3c1da2c3..ff79399c 100644
--- a/src/api/routes/ping.ts
+++ b/src/api/routes/ping.ts
@@ -5,7 +5,7 @@ import { Config } from "@fosscord/util";
 const router = Router();
 
 router.get("/", route({}), (req: Request, res: Response) => {
-	const { general } = Config.get();
+	const { general, api, cdn, gateway } = Config.get();
 	res.send({
 		ping: "pong!",
 		instance: {
@@ -19,6 +19,12 @@ router.get("/", route({}), (req: Request, res: Response) => {
 
 			frontPage: general.frontPage,
 			tosPage: general.tosPage,
+			endpoints: {
+				defaultApiVersion: api.defaultVersion ?? 9,
+				apiEndpoint: api.endpointPublic ?? "/api",
+				cdnEndpoint: cdn.endpointPublic ?? "/",
+				gatewayEndpoint: gateway.endpointPublic ?? "/",
+			},
 		},
 	});
 });