diff options
Diffstat (limited to 'src/api/routes/ping.ts')
-rw-r--r-- | src/api/routes/ping.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/api/routes/ping.ts b/src/api/routes/ping.ts new file mode 100644 index 00000000..5f1b0174 --- /dev/null +++ b/src/api/routes/ping.ts @@ -0,0 +1,26 @@ +import { route } from "@fosscord/api"; +import { Config } from "@fosscord/util"; +import { Request, Response, Router } from "express"; + +const router = Router(); + +router.get("/", route({}), (req: Request, res: Response) => { + const { general } = Config.get(); + res.send({ + ping: "pong!", + instance: { + id: general.instanceId, + name: general.instanceName, + description: general.instanceDescription, + image: general.image, + + correspondenceEmail: general.correspondenceEmail, + correspondenceUserID: general.correspondenceUserID, + + frontPage: general.frontPage, + tosPage: general.tosPage + } + }); +}); + +export default router; |