You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	API: Fixed handling of PUT method and log errors to file
This commit is contained in:
		| @@ -147,6 +147,7 @@ class ClipperServer { | ||||
| 					const response = await this.api_.route(request.method, url.pathname, url.query, body, files); | ||||
| 					writeResponse(200, response); | ||||
| 				} catch (error) { | ||||
| 					this.logger().error(error); | ||||
| 					writeResponse(error.httpCode ? error.httpCode : 500, error.message); | ||||
| 				} | ||||
| 			} | ||||
| @@ -173,7 +174,7 @@ class ClipperServer { | ||||
| 						} | ||||
| 				    }); | ||||
| 				} else { | ||||
| 					if (request.method === 'POST') { | ||||
| 					if (request.method === 'POST' || request.method === 'PUT') { | ||||
| 						let body = ''; | ||||
|  | ||||
| 						request.on('data', (data) => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user