mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	fix: remove extra params
This commit is contained in:
		
							parent
							
								
									21813a7b83
								
							
						
					
					
						commit
						ab7a07a318
					
				| @ -20,7 +20,7 @@ function register(router) { | |||||||
|         const {date} = req.params; |         const {date} = req.params; | ||||||
| 
 | 
 | ||||||
|         if (!isValidDate(date)) { |         if (!isValidDate(date)) { | ||||||
|             throw getDateInvalidError(res, date); |             throw getDateInvalidError(date); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         const note = specialNotesService.getInboxNote(date); |         const note = specialNotesService.getInboxNote(date); | ||||||
| @ -31,7 +31,7 @@ function register(router) { | |||||||
|         const {date} = req.params; |         const {date} = req.params; | ||||||
| 
 | 
 | ||||||
|         if (!isValidDate(date)) { |         if (!isValidDate(date)) { | ||||||
|             throw getDateInvalidError(res, date); |             throw getDateInvalidError(date); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         const note = dateNotesService.getDayNote(date); |         const note = dateNotesService.getDayNote(date); | ||||||
| @ -42,7 +42,7 @@ function register(router) { | |||||||
|         const {date} = req.params; |         const {date} = req.params; | ||||||
| 
 | 
 | ||||||
|         if (!isValidDate(date)) { |         if (!isValidDate(date)) { | ||||||
|             throw getDateInvalidError(res, date); |             throw getDateInvalidError(date); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         const note = dateNotesService.getWeekNote(date); |         const note = dateNotesService.getWeekNote(date); | ||||||
| @ -53,7 +53,7 @@ function register(router) { | |||||||
|         const {month} = req.params; |         const {month} = req.params; | ||||||
| 
 | 
 | ||||||
|         if (!/[0-9]{4}-[0-9]{2}/.test(month)) { |         if (!/[0-9]{4}-[0-9]{2}/.test(month)) { | ||||||
|             throw getMonthInvalidError(res, month); |             throw getMonthInvalidError(month); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         const note = dateNotesService.getMonthNote(month); |         const note = dateNotesService.getMonthNote(month); | ||||||
| @ -64,7 +64,7 @@ function register(router) { | |||||||
|         const {year} = req.params; |         const {year} = req.params; | ||||||
| 
 | 
 | ||||||
|         if (!/[0-9]{4}/.test(year)) { |         if (!/[0-9]{4}/.test(year)) { | ||||||
|             throw getYearInvalidError(res, year); |             throw getYearInvalidError(year); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         const note = dateNotesService.getYearNote(year); |         const note = dateNotesService.getYearNote(year); | ||||||
|  | |||||||
| @ -155,7 +155,7 @@ function getExpression(tokens, searchContext, level = 0) { | |||||||
| 
 | 
 | ||||||
|             i++; |             i++; | ||||||
| 
 | 
 | ||||||
|             return new NoteContentFulltextExp(operator.token, {tokens: [tokens[i].token], raw }); |             return new NoteContentFulltextExp(operator.token, {tokens: [tokens[i].token], raw}); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (tokens[i].token === 'parents') { |         if (tokens[i].token === 'parents') { | ||||||
| @ -389,7 +389,7 @@ function getExpression(tokens, searchContext, level = 0) { | |||||||
|         else if (token === 'note') { |         else if (token === 'note') { | ||||||
|             i++; |             i++; | ||||||
| 
 | 
 | ||||||
|             expressions.push(parseNoteProperty(tokens)); |             expressions.push(parseNoteProperty()); | ||||||
| 
 | 
 | ||||||
|             continue; |             continue; | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -217,7 +217,7 @@ function wrap(query, func) { | |||||||
|             // in these cases error should be simply ignored.
 |             // in these cases error should be simply ignored.
 | ||||||
|             console.log(e.message); |             console.log(e.message); | ||||||
| 
 | 
 | ||||||
|             return null |             return null; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         throw e; |         throw e; | ||||||
| @ -281,7 +281,7 @@ function fillParamList(paramIds, truncate = true) { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // doing it manually to avoid this showing up on the sloq query list
 |     // doing it manually to avoid this showing up on the sloq query list
 | ||||||
|     const s = stmt(`INSERT INTO param_list VALUES ${paramIds.map(paramId => `(?)`).join(',')}`, paramIds); |     const s = stmt(`INSERT INTO param_list VALUES ${paramIds.map(paramId => `(?)`).join(',')}`); | ||||||
| 
 | 
 | ||||||
|     s.run(paramIds); |     s.run(paramIds); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 soulsands
						soulsands