private log

This commit is contained in:
joseph le 2023-10-31 13:58:55 +07:00
parent b7da9e5805
commit c334f6d26e
1 changed files with 1 additions and 7 deletions

View File

@ -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);
}