mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
empty page on new tab nw offers list of available workspaces
This commit is contained in:
@@ -219,6 +219,19 @@ function quickSearch(req) {
|
||||
.map(sr => sr.noteId);
|
||||
}
|
||||
|
||||
function search(req) {
|
||||
const {searchString} = req.params;
|
||||
|
||||
const searchContext = new SearchContext({
|
||||
fastSearch: false,
|
||||
includeArchivedNotes: true,
|
||||
fuzzyAttributeSearch: false
|
||||
});
|
||||
|
||||
return searchService.findNotesWithQuery(searchString, searchContext)
|
||||
.map(sr => sr.noteId);
|
||||
}
|
||||
|
||||
function getRelatedNotes(req) {
|
||||
const attr = req.body;
|
||||
|
||||
@@ -302,5 +315,6 @@ module.exports = {
|
||||
searchFromNote,
|
||||
searchAndExecute,
|
||||
getRelatedNotes,
|
||||
quickSearch
|
||||
quickSearch,
|
||||
search
|
||||
};
|
||||
|
||||
@@ -266,6 +266,7 @@ function register(app) {
|
||||
apiRoute(GET, '/api/search-note/:noteId', searchRoute.searchFromNote);
|
||||
apiRoute(POST, '/api/search-and-execute-note/:noteId', searchRoute.searchAndExecute);
|
||||
apiRoute(POST, '/api/search-related', searchRoute.getRelatedNotes);
|
||||
apiRoute(GET, '/api/search/:searchString', searchRoute.search);
|
||||
|
||||
route(POST, '/api/login/sync', [], loginApiRoute.loginSync, apiResultHandler);
|
||||
// this is for entering protected mode so user has to be already logged-in (that's the reason we don't require username)
|
||||
|
||||
Reference in New Issue
Block a user