From 0a1e4e9d6b9da8086521534d0dca25f83fc8a5f3 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 25 Feb 2026 10:49:05 +0100 Subject: Add /_spacebar/api/version - resolves #1222 --- src/api/Server.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/api') diff --git a/src/api/Server.ts b/src/api/Server.ts index a6bb5178d..6a61d3cba 100644 --- a/src/api/Server.ts +++ b/src/api/Server.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Config, ConnectionConfig, ConnectionLoader, Email, JSONReplacer, WebAuthn, initDatabase, initEvent, registerRoutes, getDatabase } from "@spacebar/util"; +import { Config, ConnectionConfig, ConnectionLoader, Email, JSONReplacer, WebAuthn, initDatabase, initEvent, registerRoutes, getDatabase, getRevInfoOrFail } from "@spacebar/util"; import { Authentication, CORS, ImageProxy, BodyParser, ErrorHandler, initRateLimits, initTranslation } from "./middlewares"; import { Request, Response, Router } from "express"; import { Server, ServerOptions } from "lambert-server"; @@ -141,6 +141,13 @@ export class SpacebarServer extends Server { res.sendFile(path.join(ASSETS_FOLDER, "openapi.json")); }); + app.get("/_spacebar/api/version", (req, res) => { + res.json({ + implementation: "spacebar-server-ts", + version: getRevInfoOrFail(), + }); + }); + // current well-known location app.get("/.well-known/spacebar", (req, res) => { res.json({ -- cgit 1.5.1