mirror of
https://github.com/zadam/trilium.git
synced 2025-12-22 16:20:08 +01:00
Revert "fix(client): also move the logic from the server to the client lol"
This reverts commit e401c8c930.
This commit is contained in:
12
apps/server/src/routes/api/system_info.ts
Normal file
12
apps/server/src/routes/api/system_info.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { isRunningUnderRosetta2 } from "../../services/utils.js";
|
||||
import type { Request, Response } from "express";
|
||||
|
||||
function rosettaCheck(req: Request, res: Response) {
|
||||
res.json({
|
||||
isRunningUnderRosetta2: isRunningUnderRosetta2()
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
rosettaCheck
|
||||
};
|
||||
@@ -58,6 +58,7 @@ import ollamaRoute from "./api/ollama.js";
|
||||
import openaiRoute from "./api/openai.js";
|
||||
import anthropicRoute from "./api/anthropic.js";
|
||||
import llmRoute from "./api/llm.js";
|
||||
import systemInfoRoute from "./api/system_info.js";
|
||||
|
||||
import etapiAuthRoutes from "../etapi/auth.js";
|
||||
import etapiAppInfoRoutes from "../etapi/app_info.js";
|
||||
@@ -238,6 +239,7 @@ function register(app: express.Application) {
|
||||
apiRoute(PST, "/api/recent-notes", recentNotesRoute.addRecentNote);
|
||||
apiRoute(GET, "/api/app-info", appInfoRoute.getAppInfo);
|
||||
apiRoute(GET, "/api/metrics", metricsRoute.getMetrics);
|
||||
apiRoute(GET, "/api/system-info/rosetta-check", systemInfoRoute.rosettaCheck);
|
||||
|
||||
// docker health check
|
||||
route(GET, "/api/health-check", [], () => ({ status: "ok" }), apiResultHandler);
|
||||
|
||||
Reference in New Issue
Block a user