private log
This commit is contained in:
		
							parent
							
								
									b7da9e5805
								
							
						
					
					
						commit
						c334f6d26e
					
				| 
						 | 
					@ -340,13 +340,7 @@ 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;
 | 
				
			||||||
    await fs.readFile(path, (err, data)=>{
 | 
					    return await fs.readFileSync(path, "utf8");
 | 
				
			||||||
      if(err){
 | 
					 | 
				
			||||||
        return err
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      return data.toString()
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
  } catch (error) {
 | 
					  } catch (error) {
 | 
				
			||||||
    console.log(error);
 | 
					    console.log(error);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue