Update main.py
This commit is contained in:
parent
15d48372db
commit
c30539650b
6
main.py
6
main.py
@ -1298,7 +1298,7 @@ async def v1_players_get(
|
||||
|
||||
@app.get('/api/v1/players/random')
|
||||
async def v1_players_get_random(
|
||||
min_cost: Optional[int] = None, max_cost: Optional[int] = None, in_packs: Optional[bool] = True,
|
||||
min_cost: Optional[int] = None, max_cost: Optional[int] = None, in_packs: Optional[bool] = None,
|
||||
min_rarity: Optional[int] = None, max_rarity: Optional[int] = None, limit: Optional[int] = None,
|
||||
pos_include: Optional[str] = None, pos_exclude: Optional[str] = None, franchise: Optional[str] = None,
|
||||
mlbclub: Optional[str] = None, cardset_id: list = Query(default=None), pos_inc: list = Query(default=None),
|
||||
@ -4545,7 +4545,7 @@ async def v1_gauntletreward_get(
|
||||
if loss_max is not None:
|
||||
all_rewards = all_rewards.where(GauntletReward.loss_max == loss_max)
|
||||
|
||||
all_rewards = all_rewards.order_by(GauntletReward.win_num, GauntletReward.loss_max)
|
||||
all_rewards = all_rewards.order_by(-GauntletReward.loss_max, GauntletReward.win_num)
|
||||
|
||||
return_val = {'count': all_rewards.count(), 'rewards': []}
|
||||
for x in all_rewards:
|
||||
@ -4685,12 +4685,10 @@ async def v1_gauntletrun_get(
|
||||
if ended_before is not None:
|
||||
all_gauntlets = all_gauntlets.where(GauntletRun.ended <= ended_before)
|
||||
if is_active is not None:
|
||||
logging.info(f'get_gauntletrun - is_active: {is_active}')
|
||||
if is_active is True:
|
||||
all_gauntlets = all_gauntlets.where(GauntletRun.ended == 0)
|
||||
else:
|
||||
all_gauntlets = all_gauntlets.where(GauntletRun.ended != 0)
|
||||
logging.info(f'get_gauntletrun - query: {all_gauntlets}')
|
||||
if gauntlet_id is not None:
|
||||
all_gauntlets = all_gauntlets.where(GauntletRun.gauntlet_id << gauntlet_id)
|
||||
if season is not None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user