mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
Merge pull request #767 from MaddyUnderStars/feat/pingInformation
Expose general instance information via api /ping route
This commit is contained in:
commit
2363620faa
@ -1,10 +1,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) => {
|
||||
res.send("pong");
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user