lrf il y a 4 mois
Parent
commit
28c6c3d779
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      src/controller/platform/match.controller.ts

+ 3 - 1
src/controller/platform/match.controller.ts

@@ -35,7 +35,9 @@ export class MatchController implements BaseController {
   @ApiResponse({ type: FVO_match })
   async fetch(@Param('id') id: number) {
     const data = await this.service.fetch({ id });
-    const result = new FVO_match(data);
+    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', []) });
     return result;
   }