mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	removal of extra console logs
This commit is contained in:
		@@ -58,16 +58,10 @@ router.put('/:noteId', auth.checkApiAuth, wrap(async (req, res, next) => {
 | 
				
			|||||||
}));
 | 
					}));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
 | 
					router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
 | 
				
			||||||
    console.log("Search: ", req.query.search);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    let {attrFilters, searchText} = parseFilters(req.query.search);
 | 
					    let {attrFilters, searchText} = parseFilters(req.query.search);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    console.log(attrFilters);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const {query, params} = getSearchQuery(attrFilters, searchText);
 | 
					    const {query, params} = getSearchQuery(attrFilters, searchText);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    console.log(query, params);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const noteIds = await sql.getColumn(query, params);
 | 
					    const noteIds = await sql.getColumn(query, params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    res.send(noteIds);
 | 
					    res.send(noteIds);
 | 
				
			||||||
@@ -78,12 +72,8 @@ function parseFilters(searchText) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const attrRegex = /(\b(and|or)\s+)?@(!?)([\w_-]+|"[^"]+")((=|!=|<|<=|>|>=)([\w_-]+|"[^"]+"))?/i;
 | 
					    const attrRegex = /(\b(and|or)\s+)?@(!?)([\w_-]+|"[^"]+")((=|!=|<|<=|>|>=)([\w_-]+|"[^"]+"))?/i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    console.log("attrRegex", attrRegex);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    let match = attrRegex.exec(searchText);
 | 
					    let match = attrRegex.exec(searchText);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    console.log("Match: ", match);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    function trimQuotes(str) { return str.startsWith('"') ? str.substr(1, str.length - 2) : str; }
 | 
					    function trimQuotes(str) { return str.startsWith('"') ? str.substr(1, str.length - 2) : str; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while (match != null) {
 | 
					    while (match != null) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user