play walkout songs
This commit is contained in:
@@ -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[]> {
|
||||
|
||||
@@ -100,7 +100,7 @@ export function createTeamsService(pb: PocketBase) {
|
||||
expand: "tournament,home,away",
|
||||
});
|
||||
|
||||
return result.map(transformMatch);
|
||||
return result.map((match) => transformMatch(match));
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user