play walkout songs

This commit is contained in:
yohlo
2025-09-22 17:57:29 -05:00
parent ae934e77f4
commit b93ce38d48
12 changed files with 152 additions and 42 deletions

View File

@@ -100,7 +100,7 @@ export function createPlayersService(pb: PocketBase) {
expand: "tournament,home,away",
});
return result.map(transformMatch);
return result.map((match) => transformMatch(match));
},
async getUnenrolledPlayers(tournamentId: string): Promise<Player[]> {

View File

@@ -100,7 +100,7 @@ export function createTeamsService(pb: PocketBase) {
expand: "tournament,home,away",
});
return result.map(transformMatch);
return result.map((match) => transformMatch(match));
},
};
}

View File

@@ -14,11 +14,11 @@ import { PlayerInfo } from "@/features/players/types";
export function createTournamentsService(pb: PocketBase) {
return {
async getTournament(id: string): Promise<Tournament> {
async getTournament(id: string, isAdmin: boolean = false): Promise<Tournament> {
const result = await pb.collection("tournaments").getOne(id, {
expand: "teams, teams.players, matches, matches.tournament, matches.home, matches.away, matches.home.players, matches.away.players",
});
return transformTournament(result);
return transformTournament(result, isAdmin);
},
async getMostRecentTournament(): Promise<Tournament> {
const result = await pb