From 8e2f941173521fba1a82b4bf5c5003fa325e9afc Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:58:59 +0200 Subject: [PATCH] Add IGN to api public tournament teams response Closes #1971 --- app/features/api-public/routes/tournament.$id.teams.ts | 2 ++ app/features/api-public/schema.ts | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/app/features/api-public/routes/tournament.$id.teams.ts b/app/features/api-public/routes/tournament.$id.teams.ts index a7a35e82d..6af09e6fc 100644 --- a/app/features/api-public/routes/tournament.$id.teams.ts +++ b/app/features/api-public/routes/tournament.$id.teams.ts @@ -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(), }; }), diff --git a/app/features/api-public/schema.ts b/app/features/api-public/schema.ts index deab7d128..30cf3ac0d 100644 --- a/app/features/api-public/schema.ts +++ b/app/features/api-public/schema.ts @@ -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" */