mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
use .js extension for require() as a preparation for future migration to ESM
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
const becca = require('../becca/becca');
|
||||
const log = require('./log');
|
||||
const protectedSessionService = require('./protected_session');
|
||||
const noteService = require('./notes');
|
||||
const optionService = require('./options');
|
||||
const sql = require('./sql');
|
||||
const becca = require('../becca/becca.js');
|
||||
const log = require('./log.js');
|
||||
const protectedSessionService = require('./protected_session.js');
|
||||
const noteService = require('./notes.js');
|
||||
const optionService = require('./options.js');
|
||||
const sql = require('./sql.js');
|
||||
const jimp = require('jimp');
|
||||
const imageType = require('image-type');
|
||||
const sanitizeFilename = require('sanitize-filename');
|
||||
const isSvg = require('is-svg');
|
||||
const isAnimated = require('is-animated');
|
||||
const htmlSanitizer = require("./html_sanitizer");
|
||||
const htmlSanitizer = require('./html_sanitizer.js');
|
||||
|
||||
async function processImage(uploadBuffer, originalName, shrinkImageSwitch) {
|
||||
const compressImages = optionService.getOptionBool("compressImages");
|
||||
@@ -154,7 +154,7 @@ function saveImageToAttachment(noteId, uploadBuffer, originalName, shrinkImageSw
|
||||
setTimeout(() => {
|
||||
sql.transactional(() => {
|
||||
const note = becca.getNoteOrThrow(noteId);
|
||||
const noteService = require("../services/notes");
|
||||
const noteService = require('../services/notes.js');
|
||||
noteService.asyncPostProcessContent(note, note.getContent()); // to mark an unused attachment for deletion
|
||||
});
|
||||
}, 5000);
|
||||
|
||||
Reference in New Issue
Block a user