From 92f71e100f9e3330c9a8778f5d6556b40845e4cc Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 12 Jan 2026 20:54:18 +0200 Subject: [PATCH] chore(core): integrate app_info route --- apps/server/src/routes/routes.ts | 2 -- .../server => packages/trilium-core}/src/routes/api/app_info.ts | 0 packages/trilium-core/src/routes/index.ts | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) rename {apps/server => packages/trilium-core}/src/routes/api/app_info.ts (100%) diff --git a/apps/server/src/routes/routes.ts b/apps/server/src/routes/routes.ts index 55fa17845..5fe774cbc 100644 --- a/apps/server/src/routes/routes.ts +++ b/apps/server/src/routes/routes.ts @@ -18,7 +18,6 @@ import openID from '../services/open_id.js'; import { isElectron } from "../services/utils.js"; import shareRoutes from "../share/routes.js"; import anthropicRoute from "./api/anthropic.js"; -import appInfoRoute from "./api/app_info.js"; import attributesRoute from "./api/attributes.js"; import autocompleteApiRoute from "./api/autocomplete.js"; import backendLogRoute from "./api/backend_log.js"; @@ -189,7 +188,6 @@ function register(app: express.Application) { route(PST, "/api/sync/queue-sector/:entityName/:sector", [auth.checkApiAuth], syncApiRoute.queueSector, apiResultHandler); route(GET, "/api/sync/stats", [], syncApiRoute.getStats, apiResultHandler); - apiRoute(GET, "/api/app-info", appInfoRoute.getAppInfo); apiRoute(GET, "/api/metrics", metricsRoute.getMetrics); apiRoute(GET, "/api/system-checks", systemInfoRoute.systemChecks); diff --git a/apps/server/src/routes/api/app_info.ts b/packages/trilium-core/src/routes/api/app_info.ts similarity index 100% rename from apps/server/src/routes/api/app_info.ts rename to packages/trilium-core/src/routes/api/app_info.ts diff --git a/packages/trilium-core/src/routes/index.ts b/packages/trilium-core/src/routes/index.ts index b87f85b98..59e463b7c 100644 --- a/packages/trilium-core/src/routes/index.ts +++ b/packages/trilium-core/src/routes/index.ts @@ -7,6 +7,7 @@ import noteMapRoute from "./api/note_map"; import recentNotesRoute from "./api/recent_notes"; import otherRoute from "./api/others"; import branchesApiRoute from "./api/branches"; +import appInfoRoute from "./api/app_info"; import AbstractBeccaEntity from "../becca/entities/abstract_becca_entity"; // TODO: Deduplicate with routes.ts @@ -70,6 +71,7 @@ export function buildSharedApiRoutes(apiRoute: any) { apiRoute(GET, "/api/keyboard-actions", keysApiRoute.getKeyboardActions); apiRoute(GET, "/api/keyboard-shortcuts-for-notes", keysApiRoute.getShortcutsForNotes); + apiRoute(GET, "/api/app-info", appInfoRoute.getAppInfo); apiRoute(GET, "/api/other/icon-usage", otherRoute.getIconUsage); }