From e1957daa5c42343b0f6e86d76f82d59473151fcd Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Wed, 19 Mar 2025 19:53:03 -0500 Subject: [PATCH] feat: meta --- packages/website/src/pages/api/meta.json.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/website/src/pages/api/meta.json.ts diff --git a/packages/website/src/pages/api/meta.json.ts b/packages/website/src/pages/api/meta.json.ts new file mode 100644 index 000000000..cd1e023e9 --- /dev/null +++ b/packages/website/src/pages/api/meta.json.ts @@ -0,0 +1,13 @@ +import type { APIRoute } from 'astro'; +import packageJSON from '../../../../../package.json'; + +/** + * Returns information on the current build of BlitzKit like the version + * number, date of compilation, the game version used, etc. + * + * @todo Add more meta data. + * @returns JSON. + */ +export const GET: APIRoute = async () => { + return Response.json({ version: packageJSON.version }); +};