reset match logic

This commit is contained in:
yohlo
2025-09-11 16:13:45 -05:00
parent 97c8c9e72b
commit 51e3d5141c
2 changed files with 72 additions and 42 deletions

View File

@@ -55,6 +55,11 @@ export function createMatchesService(pb: PocketBase) {
return result;
},
async deleteMatch(id: string): Promise<void> {
logger.info("PocketBase | Deleting match", id);
await pb.collection("matches").delete(id);
},
async deleteMatchesByTournament(tournamentId: string): Promise<void> {
logger.info("PocketBase | Deleting matches for tournament", tournamentId);
const matches = await pb.collection("matches").getFullList({