mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 06:38:59 +02:00
chore(server): set up route for printing
This commit is contained in:
parent
0d94ae9f61
commit
fac31ff8be
7
apps/server/src/routes/api/print.ts
Normal file
7
apps/server/src/routes/api/print.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Request } from "express";
|
||||
|
||||
export function getPrintablePage(req: Request) {
|
||||
const { noteId } = req.params;
|
||||
|
||||
return "Hello world: " + noteId;
|
||||
}
|
@ -72,6 +72,7 @@ import etapiBackupRoute from "../etapi/backup.js";
|
||||
import etapiMetricsRoute from "../etapi/metrics.js";
|
||||
import apiDocsRoute from "./api_docs.js";
|
||||
import { apiResultHandler, apiRoute, asyncApiRoute, asyncRoute, route, router, uploadMiddlewareWithErrorHandling } from "./route_api.js";
|
||||
import { getPrintablePage } from "./api/print.js";
|
||||
|
||||
const GET = "get",
|
||||
PST = "post",
|
||||
@ -378,8 +379,6 @@ function register(app: express.Application) {
|
||||
asyncApiRoute(PST, "/api/llm/chat/:chatNoteId/messages", llmRoute.sendMessage);
|
||||
asyncApiRoute(PST, "/api/llm/chat/:chatNoteId/messages/stream", llmRoute.streamMessage);
|
||||
|
||||
|
||||
|
||||
// LLM provider endpoints - moved under /api/llm/providers hierarchy
|
||||
asyncApiRoute(GET, "/api/llm/providers/ollama/models", ollamaRoute.listModels);
|
||||
asyncApiRoute(GET, "/api/llm/providers/openai/models", openaiRoute.listModels);
|
||||
@ -388,6 +387,9 @@ function register(app: express.Application) {
|
||||
// API Documentation
|
||||
apiDocsRoute(app);
|
||||
|
||||
// Printing route
|
||||
apiRoute(GET, "/print/:noteId", getPrintablePage);
|
||||
|
||||
app.use("", router);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user