Add IGN to api public tournament teams response Closes #1971

This commit is contained in:
Kalle
2024-11-26 21:58:59 +02:00
parent c029b5c331
commit 8e2f941173
2 changed files with 9 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => {
"User.discordId",
"User.discordAvatar",
"User.battlefy",
"TournamentTeamMember.inGameName",
"TournamentTeamMember.isOwner",
"TournamentTeamMember.createdAt",
])
@@ -122,6 +123,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => {
? `https://cdn.discordapp.com/avatars/${member.discordId}/${member.discordAvatar}.png`
: null,
captain: Boolean(member.isOwner),
inGameName: member.inGameName,
joinedAt: databaseTimestampToDate(member.createdAt).toISOString(),
};
}),

View File

@@ -141,6 +141,13 @@ export type GetTournamentTeamsResponse = Array<{
*/
avatarUrl: string | null;
captain: boolean;
/**
* Splatoon 3 splashtag name & ID. Notice the value returned is the player's set name at the time of the tournament.
* Only available for tournaments with the "Require IGN's" option enabled.
*
* @example "Sendou#2955"
*/
inGameName: string | null;
/**
* @example "2024-01-12T20:00:00.000Z"
*/