Skip to content

Commit

Permalink
Merge branch 'master' into wait-healthy-containers-for-test-action
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceAesth authored Apr 21, 2024
2 parents 80370b9 + 9c8a0f3 commit 1102237
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/api/domains/osu.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,19 @@ async def osuSearchSetHandler(
player: Player = Depends(authenticate_player_session(Query, "u", "h")),
map_set_id: int | None = Query(None, alias="s"),
map_id: int | None = Query(None, alias="b"),
checksum: str | None = Query(None, alias="c"),
) -> Response:
# Since we only need set-specific data, we can basically
# just do same query with either bid or bsid.

v: int | str
if map_set_id is not None:
# this is just a normal request
k, v = ("set_id", map_set_id)
elif map_id is not None:
k, v = ("id", map_id)
elif checksum is not None:
k, v = ("md5", checksum)
else:
return Response(b"") # invalid args

Expand Down

0 comments on commit 1102237

Please sign in to comment.