@@ -9,7 +9,7 @@ import tailwindConfig from "../templates/tailwind.config";
99import { firstValueFrom } from "rxjs" ;
1010
1111import { RequiresUpdateMeta } from "../user-card/user-card.service" ;
12- import { DbInsight } from "../../github/entities/db-insight.entity" ;
12+ import { DbInsight , DbUserInsightRepo } from "../../github/entities/db-insight.entity" ;
1313import insightCardTemplate from "../templates/insight-card.template" ;
1414import insightRepos from "../templates/shared/insight-repos" ;
1515import insightContributors from "../templates/shared/insight-contributors" ;
@@ -34,12 +34,16 @@ export class InsightCardService {
3434 private async getInsightData ( insightId : number ) : Promise < InsightCardData > {
3535 const maxRepoQueryIdsLenght = 10 ;
3636
37- const insightPageReq = await firstValueFrom (
38- this . httpService . get < DbInsight > ( `${ process . env . API_BASE_URL ! } /v2/insights/${ insightId } ` ) ,
37+ const insightPageApiReq = firstValueFrom (
38+ this . httpService . get < DbInsight > ( `${ process . env . API_BASE_URL ! } /v2/insights/${ insightId } ?include=none ` ) ,
3939 ) ;
40+ const insightReposApiReq = firstValueFrom (
41+ this . httpService . get < DbUserInsightRepo [ ] > ( `${ process . env . API_BASE_URL ! } /v2/insights/${ insightId } /repos` ) ,
42+ ) ;
43+ const [ insightPageReq , insightReposReq ] = await Promise . all ( [ insightPageApiReq , insightReposApiReq ] ) ;
4044
41- const { repos , name, updated_at } = insightPageReq . data ;
42-
45+ const { name, updated_at } = insightPageReq . data ;
46+ const { data : repos } = insightReposReq ;
4347 const query = ( new URLSearchParams ) ;
4448
4549 query . set (
0 commit comments