mirror of
https://github.com/zadam/trilium.git
synced 2026-01-17 20:14:25 +01:00
chore(client/lightweight): tree route import not seen
This commit is contained in:
parent
adfe490480
commit
0fe299250e
@ -2,8 +2,6 @@
|
||||
// This will eventually import your core server and DB provider.
|
||||
// import { createCoreServer } from "@trilium/core"; (bundled)
|
||||
|
||||
import { routes } from '@triliumnext/core';
|
||||
|
||||
import BrowserExecutionContext from './lightweight/cls_provider';
|
||||
import BrowserCryptoProvider from './lightweight/crypto_provider';
|
||||
import BrowserSqlProvider from './lightweight/sql_provider';
|
||||
@ -203,14 +201,18 @@ async function dispatch(request: LocalRequest) {
|
||||
}
|
||||
|
||||
// Ensure initialization is complete before accessing routes
|
||||
await ensureInitialized();
|
||||
const core = await ensureInitialized();
|
||||
|
||||
if (request.method === "GET" && url.pathname === "/api/options") {
|
||||
return jsonResponse(routes.optionsApiRoute.getOptions());
|
||||
return jsonResponse(core.routes.optionsApiRoute.getOptions());
|
||||
}
|
||||
|
||||
if (request.method === "GET" && url.pathname === "/api/tree") {
|
||||
return jsonResponse(routes.treeApiRoute.getTree());
|
||||
return jsonResponse(core.routes.treeApiRoute.getTree({
|
||||
query: {
|
||||
subTreeNoteId: url.searchParams.get("subTreeNoteId") || undefined
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
if (url.pathname.startsWith("/api/echo")) {
|
||||
|
||||
@ -52,7 +52,8 @@ export { default as Becca } from "./becca/becca-interface";
|
||||
export type { NotePojo } from "./becca/becca-interface";
|
||||
|
||||
export { default as NoteSet } from "./services/search/note_set";
|
||||
export { default as note_service, NoteParams } from "./services/notes";
|
||||
export { default as note_service } from "./services/notes";
|
||||
export type { NoteParams } from "./services/notes";
|
||||
export * as sanitize from "./services/sanitizer";
|
||||
export * as routes from "./routes";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user