settings link, uneroll team server fn
This commit is contained in:
@@ -57,5 +57,16 @@ export function createTournamentsService(pb: PocketBase) {
|
||||
);
|
||||
return transformTournament(result);
|
||||
},
|
||||
async unenrollTeam(
|
||||
tournamentId: string,
|
||||
teamId: string
|
||||
): Promise<Tournament> {
|
||||
const result = await pb.collection("tournaments").update<Tournament>(
|
||||
tournamentId,
|
||||
{ "teams-": teamId },
|
||||
{ expand: "teams, teams.players" }
|
||||
);
|
||||
return transformTournament(result);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user