mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 23:35:50 +01:00
server-esm: Solve some more imports
This commit is contained in:
@@ -4,19 +4,19 @@ import { Request } from "express";
|
||||
|
||||
import becca from "../../becca/becca.js";
|
||||
import SearchContext from "../../services/search/search_context.js";
|
||||
import searchService from "../../services/search/services/search.js";
|
||||
import searchService, { EMPTY_RESULT, SearchNoteResult } from "../../services/search/services/search.js";
|
||||
import bulkActionService from "../../services/bulk_actions.js";
|
||||
import cls from "../../services/cls.js";
|
||||
import attributeFormatter from "../../services/attribute_formatter.js";
|
||||
import ValidationError from "../../errors/validation_error.js";
|
||||
import SearchResult from "../../services/search/search_result.js";
|
||||
|
||||
function searchFromNote(req: Request) {
|
||||
function searchFromNote(req: Request): SearchNoteResult {
|
||||
const note = becca.getNoteOrThrow(req.params.noteId);
|
||||
|
||||
if (!note) {
|
||||
// this can be triggered from recent changes, and it's harmless to return an empty list rather than fail
|
||||
return [];
|
||||
return EMPTY_RESULT;
|
||||
}
|
||||
|
||||
if (note.type !== 'search') {
|
||||
|
||||
Reference in New Issue
Block a user