Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Sep 3, 2024
1 parent a003c7d commit b11b11b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ async def manual_startup(secret: str):
)
_highscores = hiscores[-1]
logger.info(_highscores)

id = _highscores.get("Player_id")
hiscores = pd.DataFrame(hiscores)

Expand All @@ -81,6 +82,8 @@ async def manual_startup(secret: str):
await asyncio.sleep(60)
continue

print(hiscores.head(1))

names = hiscores[["Player_id", "name"]]
names = names.rename(columns={"Player_id": "id"})
hiscores = hiscores[[c for c in hiscores.columns if c != "name"]]
Expand Down
2 changes: 1 addition & 1 deletion api/cogs/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def get_prediction_data(player_id: int = 0, limit: int = 0):
name=scraper_data.player_name,
).model_dump()
)
return data
return hiscores


async def post_prediction(data: list[dict]):
Expand Down

0 comments on commit b11b11b

Please sign in to comment.