update send report

This commit is contained in:
joseph le 2023-09-04 16:04:49 +07:00
parent deba81443b
commit 0b0464b559
2 changed files with 5 additions and 2 deletions

View File

@ -33,6 +33,9 @@ export async function getListLineByItem(listReport) {
) {
console.log(u.detected_content);
list[index].line = list[index].line?.concat(u.line);
if(report.created_at < u.created_at){
list[index].created_at = u.created_at
}
}
});
});

View File

@ -143,7 +143,7 @@ export async function runtimeCheckLogs(folderPath) {
let listReport = await getListLineByItem(logsDetect[0])
let content =
"| |Detected at | Item/error | Line | Report \n|---|:---:|:---:|:---:|:-----------:\n";
"| |Last updated at | Item/error | Line | Report \n|---|:---:|:---:|:---:|:-----------:\n";
let spoiler = "";
// let file = await fs
// .readFileSync(filePath)
@ -206,7 +206,7 @@ export async function runtimeCheckLogs(folderPath) {
"|" +
(index + 1) +
"|**" +
moment(Date.now()).format("HH:mm - DD/MM") +
moment(log.created_at).format("HH:mm - DD/MM") +
"**|" +
log.detected_content+
"|" +