summary refs log tree commit diff
path: root/api/src/routes/updates.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/updates.ts')
-rw-r--r--api/src/routes/updates.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/api/src/routes/updates.ts b/api/src/routes/updates.ts
new file mode 100644
index 00000000..4682ce7c
--- /dev/null
+++ b/api/src/routes/updates.ts
@@ -0,0 +1,20 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+import { Config, Relase } from "@fosscord/util";
+
+const router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	const { client } = Config.get();
+
+    const relase = await Relase.findOneOrFail({ name: client.relases.upstreamVersion})
+
+	res.json({
+        name: relase.name,
+        pub_date: relase.pub_date,
+        url: relase.url,
+        notes: relase.notes
+    });
+});
+
+export default router;