Allow filtering by tier in search call
This commit is contained in:
parent
792edb4c88
commit
2462d6768a
1 changed files with 2 additions and 2 deletions
|
@ -12,8 +12,8 @@ class SoulServer:
|
||||||
await self.soul_client.connect()
|
await self.soul_client.connect()
|
||||||
|
|
||||||
@router.expose
|
@router.expose
|
||||||
async def search_cards(self, search_term):
|
async def search_cards(self, search_term, tier=None):
|
||||||
r = await self.soul_client.call("cardindex", {"search": search_term})
|
r = await self.soul_client.call("cardindex", {"search": search_term, "category": tier})
|
||||||
cards = [Card(doc).to_dict() for doc in r['data']['docs']]
|
cards = [Card(doc).to_dict() for doc in r['data']['docs']]
|
||||||
|
|
||||||
return cards
|
return cards
|
||||||
|
|
Loading…
Reference in a new issue