Skip to content

Build your personal knowledge base with Trilium Notes

fix: remove unused variable

soulsands745e120a0bc6
diff --git a/src/public/app/services/import.js b/src/public/app/services/import.js
index dfc91c0df8..7e5fc43b60 100644
--- a/src/public/app/services/import.js
+++ b/src/public/app/services/import.js
@@ -10,7 +10,6 @@ export async function uploadFiles(parentNoteId, files, options) {
}
const taskId = utils.randomString(10);
- let noteId;
let counter = 0;
for (const file of files) {
@@ -25,19 +24,19 @@ export async function uploadFiles(parentNoteId, files, options) {
formData.append(key, options[key]);
}
- ({noteId} = await $.ajax({
+ await $.ajax({
url: `${baseApiUrl}notes/${parentNoteId}/import`,
headers: await server.getHeaders(),
data: formData,
dataType: 'json',
type: 'POST',
timeout: 60 * 60 * 1000,
- error: function(xhr) {
+ error: function (xhr) {
toastService.showError(`Import failed: ${xhr.responseText}`);
},
contentType: false, // NEEDED, DON'T REMOVE THIS
processData: false, // NEEDED, DON'T REMOVE THIS
- }));
+ });
}
}
@@ -74,4 +73,4 @@ ws.subscribeToMessages(async message => {
export default {
uploadFiles
-}
+};