mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	server-ts: Address requested changes
This commit is contained in:
		
							parent
							
								
									8629993fe4
								
							
						
					
					
						commit
						138be84e45
					
				| @ -239,6 +239,10 @@ function parseBoolean(obj: any, name: string) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function parseOrderDirection(obj: any, name: string) { | function parseOrderDirection(obj: any, name: string) { | ||||||
|  |     if (!(name in obj)) { | ||||||
|  |         return undefined; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     const integer = parseInt(obj[name]); |     const integer = parseInt(obj[name]); | ||||||
| 
 | 
 | ||||||
|     if (!['asc', 'desc'].includes(obj[name])) { |     if (!['asc', 'desc'].includes(obj[name])) { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import fs = require('fs'); | |||||||
| import path = require('path'); | import path = require('path'); | ||||||
| 
 | 
 | ||||||
| const specPath = path.join(__dirname, 'etapi.openapi.yaml'); | const specPath = path.join(__dirname, 'etapi.openapi.yaml'); | ||||||
| let spec: any = null; | let spec: string | null = null; | ||||||
| 
 | 
 | ||||||
| function register(router: Router) { | function register(router: Router) { | ||||||
|     router.get('/etapi/etapi.openapi.yaml', (req, res, next) => { |     router.get('/etapi/etapi.openapi.yaml', (req, res, next) => { | ||||||
|  | |||||||
| @ -24,7 +24,7 @@ function isString(obj: ValidatorArg) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function isLocalDateTime(obj: ValidatorArg) { | function isLocalDateTime(obj: ValidatorArg) { | ||||||
|     if (obj === undefined || obj === null || typeof obj !== "string") { |     if (typeof obj !== "string") { | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -32,7 +32,7 @@ function isLocalDateTime(obj: ValidatorArg) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function isUtcDateTime(obj: ValidatorArg) { | function isUtcDateTime(obj: ValidatorArg) { | ||||||
|     if (obj === undefined || obj === null || typeof obj !== "string") { |     if (typeof obj !== "string") { | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran