update component ShowLog

This commit is contained in:
joseph le 2023-09-13 08:19:34 +07:00
parent 91761d30bc
commit 421d35d1d1
1 changed files with 7 additions and 7 deletions

View File

@ -45,18 +45,18 @@ export async function runtimeCheckLogs(folderPath) {
if (
//Sua \\ --> /
filePath?.split(".")[filePath.split(".").length - 1] === "log" &&
filePath.split("\\")[filePath.split("\\").length - 1]?.split("-")[0] ===
filePath.split("/")[filePath.split("/").length - 1]?.split("-")[0] ===
moment(Date.now()).format("YYYYMMDD").toString()
) {
console.log("New file added: ", filePath);
// await LogDetectFile.firstOrCreate(
// { file_name: filePath.split("/")[filePath.split("/").length - 1] },
// { file_name: filePath.split("/")[filePath.split("/").length - 1] }
// );
await LogDetectFile.firstOrCreate(
{ file_name: filePath.split("\\")[filePath.split("\\").length - 1] },
{ file_name: filePath.split("\\")[filePath.split("\\").length - 1] }
{ file_name: filePath.split("/")[filePath.split("/").length - 1] },
{ file_name: filePath.split("/")[filePath.split("/").length - 1] }
);
// await LogDetectFile.firstOrCreate(
// { file_name: filePath.split("\\")[filePath.split("\\").length - 1] },
// { file_name: filePath.split("\\")[filePath.split("\\").length - 1] }
// );
fileList_old = fileList;
updateFileList();