-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ leaderboard metadata 에 coalitionList 추가
- #378
- Loading branch information
Showing
7 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
app/src/page/leaderboard/metadata/leaderboard.metadata.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
app/src/page/leaderboard/metadata/leaderboard.metadata.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { CoalitionService } from 'src/api/coalition/coalition.service'; | ||
import { PromoService } from 'src/api/promo/promo.service'; | ||
import type { Coalition } from 'src/page/common/models/coalition.model'; | ||
import type { Promo } from 'src/page/common/models/promo.model'; | ||
|
||
@Injectable() | ||
export class LeaderboardMetadataService { | ||
constructor(private readonly promoService: PromoService) {} | ||
constructor( | ||
private readonly promoService: PromoService, | ||
private readonly coalitionService: CoalitionService, | ||
) {} | ||
|
||
async promoList(): Promise<Promo[]> { | ||
return await this.promoService.promoList(); | ||
} | ||
|
||
async coalitionList(): Promise<Coalition[]> { | ||
return await this.coalitionService.getSeoulCoalitions(); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
app/src/page/leaderboard/metadata/models/leaderboard.metadata.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import { Field, ObjectType } from '@nestjs/graphql'; | ||
import { Coalition } from 'src/page/common/models/coalition.model'; | ||
import { Promo } from 'src/page/common/models/promo.model'; | ||
|
||
@ObjectType() | ||
export class LeaderboardMetadata { | ||
@Field((_type) => [Promo]) | ||
promoList: Promo[]; | ||
|
||
@Field((_type) => [Coalition]) | ||
coalitionList: Coalition[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters