private log
This commit is contained in:
		
							parent
							
								
									cb52ae28a4
								
							
						
					
					
						commit
						b7da9e5805
					
				| 
						 | 
					@ -340,7 +340,13 @@ Route.post("/api/private-log/readFile", async ({ request, response }) => {
 | 
				
			||||||
  try {
 | 
					  try {
 | 
				
			||||||
    let result = [];
 | 
					    let result = [];
 | 
				
			||||||
    let path = request.all().filePath;
 | 
					    let path = request.all().filePath;
 | 
				
			||||||
    return fs.readFile(path)
 | 
					    await fs.readFile(path, (err, data)=>{
 | 
				
			||||||
 | 
					      if(err){
 | 
				
			||||||
 | 
					        return err
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return data.toString()
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
  } catch (error) {
 | 
					  } catch (error) {
 | 
				
			||||||
    console.log(error);
 | 
					    console.log(error);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue