summary refs log tree commit diff
path: root/api/src/routes/ping.ts
blob: 3c1da2c38298e04815fa13440c56dda5084c6f99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { Router, Response, Request } from "express";
import { route } from "@fosscord/api";
import { Config } from "@fosscord/util";

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;