Compare commits
4 Commits
724a78ec70
...
f30e7c7433
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f30e7c7433 | ||
![]() |
d46c835897 | ||
![]() |
c9b66499f7 | ||
![]() |
bcd9206340 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
config*
|
||||
config.ini
|
||||
.env/
|
||||
db.sqlite3
|
||||
__pycache__/
|
||||
|
@ -157,6 +157,9 @@ async def register(ctx, *args):
|
||||
name = " ".join(args)
|
||||
print(name)
|
||||
league_name = requests.get(f"{URL}/players/{name}").json()
|
||||
<<<<<<< HEAD
|
||||
print(league_name)
|
||||
=======
|
||||
|
||||
try:
|
||||
if not league_name["detail"] == "Not found.":
|
||||
@ -164,6 +167,7 @@ async def register(ctx, *args):
|
||||
except KeyError:
|
||||
if league_name["discord_id"]:
|
||||
return await ctx.send(f"{league_name['discord']} has claimed this account.")
|
||||
>>>>>>> 724a78ec70c1093baf80abc93712303e1291cc94
|
||||
|
||||
claim_account = requests.post(f"{URL}/players/", data={
|
||||
"discord": ctx.author.name,
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -64,7 +64,7 @@ def game(request):
|
||||
"""
|
||||
Returns fair team composition for a given list of players
|
||||
"""
|
||||
player_ids = request.data.getlist("players")
|
||||
player_ids = request.GET.getlist("players")
|
||||
players = list()
|
||||
failed = False
|
||||
for player in player_ids:
|
||||
@ -123,7 +123,7 @@ def game(request):
|
||||
team1 = group1[::2] + group2[1::2]
|
||||
team2 = group2[::2] + group1[1::2]
|
||||
|
||||
return Response({team1, team2})
|
||||
return Response((team1, team2), status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user