Add basic info in ping
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
This commit is contained in:
parent
c93f27f514
commit
754d8dbf64
@ -5,7 +5,7 @@ import { Config } from "@fosscord/util";
|
|||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
router.get("/", route({}), (req: Request, res: Response) => {
|
router.get("/", route({}), (req: Request, res: Response) => {
|
||||||
const { general } = Config.get();
|
const { general, api, cdn, gateway } = Config.get();
|
||||||
res.send({
|
res.send({
|
||||||
ping: "pong!",
|
ping: "pong!",
|
||||||
instance: {
|
instance: {
|
||||||
@ -19,6 +19,12 @@ router.get("/", route({}), (req: Request, res: Response) => {
|
|||||||
|
|
||||||
frontPage: general.frontPage,
|
frontPage: general.frontPage,
|
||||||
tosPage: general.tosPage,
|
tosPage: general.tosPage,
|
||||||
|
endpoints: {
|
||||||
|
defaultApiVersion: api.defaultVersion ?? 9,
|
||||||
|
apiEndpoint: api.endpointPublic ?? "/api",
|
||||||
|
cdnEndpoint: cdn.endpointPublic ?? "/",
|
||||||
|
gatewayEndpoint: gateway.endpointPublic ?? "/",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2,4 +2,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…
x
Reference in New Issue
Block a user