Skip to content

Commit df4dfbf

Browse files
authored
Merge pull request #1 from retke/patch-1
Add participants.clear method
2 parents 1202f00 + d713b9d commit df4dfbf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

achallonge/participants.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ async def destroy(tournament, participant_id):
8686
f"tournaments/{tournament}/participants/{participant_id}")
8787

8888

89+
async def clear(tournament):
90+
"""Deletes all participants in a tournament.
91+
(Only allowed if tournament hasn't started yet)
92+
""""
93+
await api.fetch(
94+
"DELETE",
95+
f"tournaments/{tournament}/participants/clear")
96+
97+
8998
async def randomize(tournament):
9099
"""Randomize seeds among participants.
91100

0 commit comments

Comments
 (0)