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