mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-29 11:44:21 +08:00 
			
		
		
		
	ETAPI WIP
This commit is contained in:
		
							parent
							
								
									c33bc7e12c
								
							
						
					
					
						commit
						c448d34a38
					
				| @ -333,8 +333,6 @@ components: | |||||||
|           type: string |           type: string | ||||||
|         content: |         content: | ||||||
|           type: string |           type: string | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     Note: |     Note: | ||||||
|       type: object |       type: object | ||||||
|       properties: |       properties: | ||||||
| @ -18,8 +18,6 @@ function register(router) { | |||||||
| 
 | 
 | ||||||
|         const foundNotes = searchService.searchNotes(search, searchParams); |         const foundNotes = searchService.searchNotes(search, searchParams); | ||||||
| 
 | 
 | ||||||
|         console.log(foundNotes.map(note => mappers.mapNoteToPojo(note))); |  | ||||||
| 
 |  | ||||||
|         res.json(foundNotes.map(note => mappers.mapNoteToPojo(note))); |         res.json(foundNotes.map(note => mappers.mapNoteToPojo(note))); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,11 +1,11 @@ | |||||||
| const fs = require('fs'); | const fs = require('fs'); | ||||||
| const path = require('path'); | const path = require('path'); | ||||||
| 
 | 
 | ||||||
| const specPath = path.join(__dirname, 'spec.openapi.yaml'); | const specPath = path.join(__dirname, 'etapi.openapi.yaml'); | ||||||
| let spec = null; | let spec = null; | ||||||
| 
 | 
 | ||||||
| function register(router) { | function register(router) { | ||||||
|     router.get('/etapi/spec.openapi.yaml', (req, res, next) => { |     router.get('/etapi/etapi.openapi.yaml', (req, res, next) => { | ||||||
|         if (!spec) { |         if (!spec) { | ||||||
|             spec = fs.readFileSync(specPath, 'utf8'); |             spec = fs.readFileSync(specPath, 'utf8'); | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam