Skip to content

Build your personal knowledge base with Trilium Notes

chore(server): fix a few more type errors

Elian Doran970f4b028d9f
diff --git a/apps/edit-docs/src/utils.ts b/apps/edit-docs/src/utils.ts
index 28740f3bd6..8a03ef6a00 100644
--- a/apps/edit-docs/src/utils.ts
+++ b/apps/edit-docs/src/utils.ts
@@ -52,7 +52,7 @@ export function startElectron(callback: () => void): DeferredPromise<void> {
export async function importData(path: string) {
const buffer = await createImportZip(path);
const importService = (await import("@triliumnext/server/src/services/import/zip.js")).default;
- const context = new TaskContext("no-progress-reporting", "import", false);
+ const context = new TaskContext("no-progress-reporting", "importNotes", null);
const becca = (await import("@triliumnext/server/src/becca/becca.js")).default;
const rootNote = becca.getRoot();
diff --git a/apps/server/src/services/import/single.spec.ts b/apps/server/src/services/import/single.spec.ts
index b16124cbb5..0d0af35f74 100644
--- a/apps/server/src/services/import/single.spec.ts
+++ b/apps/server/src/services/import/single.spec.ts
@@ -14,7 +14,7 @@ const scriptDir = dirname(fileURLToPath(import.meta.url));
async function testImport(fileName: string, mimetype: string) {
const buffer = fs.readFileSync(path.join(scriptDir, "samples", fileName));
- const taskContext = TaskContext.getInstance("import-mdx", "import", {
+ const taskContext = TaskContext.getInstance("import-mdx", "importNotes", {
textImportedAsText: true,
codeImportedAsCode: true
});
diff --git a/apps/server/src/services/import/zip.spec.ts b/apps/server/src/services/import/zip.spec.ts
index db2c7ba76e..a74c243c45 100644
--- a/apps/server/src/services/import/zip.spec.ts
+++ b/apps/server/src/services/import/zip.spec.ts
@@ -14,7 +14,7 @@ const scriptDir = dirname(fileURLToPath(import.meta.url));
async function testImport(fileName: string) {
const mdxSample = fs.readFileSync(path.join(scriptDir, "samples", fileName));
- const taskContext = TaskContext.getInstance("import-mdx", "import", {
+ const taskContext = TaskContext.getInstance("import-mdx", "importNotes", {
textImportedAsText: true
});