zs 4 meses atrás
pai
commit
d8c01fdbb2
1 arquivos alterados com 11 adições e 11 exclusões
  1. 11 11
      src/controller/platform/match.controller.ts

+ 11 - 11
src/controller/platform/match.controller.ts

@@ -29,20 +29,20 @@ export class MatchController implements BaseController {
     const { data: list, total } = await this.service.query(qobj, others);
     const fillList = [];
     for (const i of list) {
-      const nobj = cloneDeep(i)
-      const form = get(i, 'form')
+      const nobj = cloneDeep(i);
+      const form = get(i, 'form');
       if (form !== '4') {
-        fillList.push(nobj)
-        continue
+        fillList.push(nobj);
+        continue;
       }
-      const match_id = get(i, 'id')
-      const extData = await this.matchExtService.fetch({ match_id })
+      const match_id = get(i, 'id');
+      const extData = await this.matchExtService.fetch({ match_id });
       if (!extData) {
-        fillList.push(nobj)
-        continue
+        fillList.push(nobj);
+        continue;
       }
-      nobj.ext_status = get(extData, 'status')
-      fillList.push(nobj)
+      nobj.ext_status = get(extData, 'status');
+      fillList.push(nobj);
     }
     return { data: fillList, total };
   }
@@ -54,7 +54,7 @@ export class MatchController implements BaseController {
     const data = await this.service.fetch({ id });
     let result = new FVO_match(data);
     const extData = await this.matchExtService.fetch({ match_id: id });
-    result = Object.assign(result, { ext_info: get(extData, 'info', []), ext_finals: get(extData, 'finals', []) });
+    result = Object.assign(result, { ext_status: get(extData, 'status', ''), ext_info: get(extData, 'info', []), ext_finals: get(extData, 'finals', []) });
     return result;
   }