style(api): apply prettier formatting
This commit is contained in:
1 parent
80fef25af3
commit
96fede9fe5
75 files changed
+955
-674
No files matched your search
@@ -46,11 +46,13 @@ export function countKnownParticipants(
|
||||
): { team100: number; team200: number; total: number } {
|
||||
const team100 = detail.info.participants.filter(
|
||||
(participant) =>
|
||||
participant.teamId === RIOT_BLUE_TEAM_ID && userByPuuid.has(participant.puuid),
|
||||
participant.teamId === RIOT_BLUE_TEAM_ID &&
|
||||
userByPuuid.has(participant.puuid),
|
||||
).length;
|
||||
const team200 = detail.info.participants.filter(
|
||||
(participant) =>
|
||||
participant.teamId === RIOT_RED_TEAM_ID && userByPuuid.has(participant.puuid),
|
||||
participant.teamId === RIOT_RED_TEAM_ID &&
|
||||
userByPuuid.has(participant.puuid),
|
||||
).length;
|
||||
return { team100, team200, total: team100 + team200 };
|
||||
}
|
||||
@@ -78,13 +80,16 @@ export function buildParticipantsSnapshot(
|
||||
tagLine: user.account.tagLine || participant.riotIdTagLine,
|
||||
profileIconId: user.account.profileIconId,
|
||||
tier:
|
||||
user.account.tiers.find((tier) => tier.queueType === 'RANKED_SOLO_5x5') ??
|
||||
user.account.tiers[0],
|
||||
user.account.tiers.find(
|
||||
(tier) => tier.queueType === 'RANKED_SOLO_5x5',
|
||||
) ?? user.account.tiers[0],
|
||||
preferredPositions: user.preferredPositions,
|
||||
joinedAt: new Date(detail.info.gameCreation),
|
||||
};
|
||||
})
|
||||
.filter((participant): participant is MatchParticipant => Boolean(participant));
|
||||
.filter((participant): participant is MatchParticipant =>
|
||||
Boolean(participant),
|
||||
);
|
||||
}
|
||||
|
||||
export function buildTeams(
|
||||
@@ -105,7 +110,9 @@ export function buildTeams(
|
||||
assignedPosition: resolveAssignedPosition(participant, user),
|
||||
};
|
||||
})
|
||||
.filter((member): member is NonNullable<typeof member> => Boolean(member));
|
||||
.filter((member): member is NonNullable<typeof member> =>
|
||||
Boolean(member),
|
||||
);
|
||||
return {
|
||||
teamIndex,
|
||||
name: `${teamIndex}팀`,
|
||||
|
||||
Reference in new issue
Block a user