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 {
|
||||
let result = [];
|
||||
let path = request.all().filePath;
|
||||
await fs.readFile(path, (err, data)=>{
|
||||
if(err){
|
||||
return err
|
||||
}
|
||||
|
||||
return data.toString()
|
||||
})
|
||||
return await fs.readFileSync(path, "utf8");
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue