From 421d35d1d1b0149d38c2ab75b4a1580f4a304b1f Mon Sep 17 00:00:00 2001 From: joseph le Date: Wed, 13 Sep 2023 08:19:34 +0700 Subject: [PATCH] update component ShowLog --- app/utils/runtimeCheckLogs.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/utils/runtimeCheckLogs.ts b/app/utils/runtimeCheckLogs.ts index 7169b1c..15238b4 100644 --- a/app/utils/runtimeCheckLogs.ts +++ b/app/utils/runtimeCheckLogs.ts @@ -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();