update code
This commit is contained in:
		
							parent
							
								
									2a08583c03
								
							
						
					
					
						commit
						2c9198c35c
					
				| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue