lrf 2 年之前
父節點
當前提交
c9d7b3efba
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      app/service/patent/patentwarning.js

+ 2 - 4
app/service/patent/patentwarning.js

@@ -38,7 +38,6 @@ class PatentwarningService extends CrudService {
     const tempDirRootPath = `${uncompressFilePath}${sep}`;
     const tempDir = await fs.readdirSync(tempDirRootPath);
     const errorList = [];
-    let throwData = [];
     for (const tempDirPath of tempDir) {
       if (tempDirPath.includes('.zip')) continue;
       // const thisDirPath = `${tempDirRootPath}${sep}${tempDirPath}`;
@@ -133,8 +132,8 @@ class PatentwarningService extends CrudService {
               continue;
             }
           }
+
         }
-        throwData = [...throwData, ...patents];
       } finally {
         try {
           await this.dirDelete(`${thisDirPath}`);
@@ -144,8 +143,7 @@ class PatentwarningService extends CrudService {
       }
     }
     if (errorList.length > 0) return errorList;
-    return throwData;
-    // return 'ok';
+    return 'ok';
   }
 
   /**