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();