mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 02:05:53 +01:00
server-ts: errors/*.js -> .ts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const becca = require('../../becca/becca.js');
|
||||
const blobService = require('../../services/blob.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
const imageService = require("../../services/image.js");
|
||||
|
||||
function getAttachmentBlob(req) {
|
||||
|
||||
@@ -5,7 +5,7 @@ const log = require('../../services/log');
|
||||
const attributeService = require('../../services/attributes.js');
|
||||
const BAttribute = require('../../becca/entities/battribute.js');
|
||||
const becca = require('../../becca/becca.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
|
||||
function getEffectiveNoteAttributes(req) {
|
||||
const note = becca.getNote(req.params.noteId);
|
||||
|
||||
@@ -9,7 +9,7 @@ const becca = require('../../becca/becca.js');
|
||||
const TaskContext = require('../../services/task_context.js');
|
||||
const branchService = require('../../services/branches.js');
|
||||
const log = require('../../services/log');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
const eventService = require("../../services/events.js");
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ const opmlExportService = require('../../services/export/opml.js');
|
||||
const becca = require('../../becca/becca.js');
|
||||
const TaskContext = require('../../services/task_context.js');
|
||||
const log = require('../../services/log');
|
||||
const NotFoundError = require('../../errors/not_found_error.js');
|
||||
const NotFoundError = require('../../errors/not_found_error');
|
||||
|
||||
function exportBranch(req, res) {
|
||||
const {branchId, type, format, version, taskId} = req.params;
|
||||
|
||||
@@ -10,7 +10,7 @@ const { Readable } = require('stream');
|
||||
const chokidar = require('chokidar');
|
||||
const ws = require('../../services/ws.js');
|
||||
const becca = require('../../becca/becca.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
|
||||
function updateFile(req) {
|
||||
const note = becca.getNoteOrThrow(req.params.noteId);
|
||||
|
||||
@@ -10,7 +10,7 @@ const becca = require('../../becca/becca.js');
|
||||
const beccaLoader = require('../../becca/becca_loader.js');
|
||||
const log = require('../../services/log');
|
||||
const TaskContext = require('../../services/task_context.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
|
||||
async function importNotesToBranch(req) {
|
||||
const {parentNoteId} = req.params;
|
||||
|
||||
@@ -8,7 +8,7 @@ const utils = require('../../services/utils');
|
||||
const log = require('../../services/log');
|
||||
const TaskContext = require('../../services/task_context.js');
|
||||
const becca = require('../../becca/becca.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
const blobService = require('../../services/blob.js');
|
||||
|
||||
function getNote(req) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
const optionService = require('../../services/options.js');
|
||||
const log = require('../../services/log');
|
||||
const searchService = require('../../services/search/services/search.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
|
||||
// options allowed to be updated directly in the Options dialog
|
||||
const ALLOWED_OPTIONS = new Set([
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
const passwordService = require('../../services/encryption/password.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
|
||||
function changePassword(req) {
|
||||
if (passwordService.isPasswordSet()) {
|
||||
|
||||
@@ -6,7 +6,7 @@ const searchService = require('../../services/search/services/search.js');
|
||||
const bulkActionService = require('../../services/bulk_actions.js');
|
||||
const cls = require('../../services/cls');
|
||||
const {formatAttrForSearch} = require('../../services/attribute_formatter.js');
|
||||
const ValidationError = require('../../errors/validation_error.js');
|
||||
const ValidationError = require('../../errors/validation_error');
|
||||
|
||||
function searchFromNote(req) {
|
||||
const note = becca.getNoteOrThrow(req.params.noteId);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
const becca = require('../../becca/becca.js');
|
||||
const log = require('../../services/log');
|
||||
const NotFoundError = require('../../errors/not_found_error.js');
|
||||
const NotFoundError = require('../../errors/not_found_error');
|
||||
|
||||
function getNotesAndBranchesAndAttributes(noteIds) {
|
||||
noteIds = new Set(noteIds);
|
||||
|
||||
Reference in New Issue
Block a user