empty page on new tab nw offers list of available workspaces

This commit is contained in:
zadam
2021-03-28 00:07:38 +01:00
parent 744ed27d91
commit 6541523e88
8 changed files with 10506 additions and 440 deletions

View File

@@ -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
};

View File

@@ -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)