Skip to content

Scheduling infrastructure for absolutely everyone.

feat: adds new version endpoint in internal api (#3155)

Agusti Fernandez Pardo5ec4b7ad3796
diff --git a/apps/web/pages/api/version.ts b/apps/web/pages/api/version.ts
new file mode 100644
index 00000000000..9b05eef8ab8
--- /dev/null
+++ b/apps/web/pages/api/version.ts
@@ -0,0 +1,10 @@
+import type { NextApiRequest, NextApiResponse } from "next";
+import * as pjson from "package.json";
+
+type Response = {
+ version: string;
+};
+
+export default async function handler(req: NextApiRequest, res: NextApiResponse<Response>): Promise<void> {
+ return res.status(200).json({ version: pjson.version });
+}