Fixed results order
This commit is contained in:
parent
42ca71aa3e
commit
1248efd20f
@ -46,7 +46,7 @@ async def search_name(app: PyroClient, message: Message) -> Union[Location, None
|
|||||||
|
|
||||||
query = {"$text": {"$search": answer.text}}
|
query = {"$text": {"$search": answer.text}}
|
||||||
|
|
||||||
locations = await col_locations.find(query).limit(6).to_list()
|
locations = (await col_locations.find(query).limit(6).to_list()).reverse()
|
||||||
|
|
||||||
if len(locations) == 0:
|
if len(locations) == 0:
|
||||||
await message.reply_text(
|
await message.reply_text(
|
||||||
|
@ -24,7 +24,7 @@ async def search_nearby(app: PyroClient, message: Message) -> Union[Location, No
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
locations = await col_locations.find(query).limit(6).to_list()
|
locations = (await col_locations.find(query).limit(6).to_list()).reverse()
|
||||||
|
|
||||||
if len(locations) == 0:
|
if len(locations) == 0:
|
||||||
await message.reply_text(
|
await message.reply_text(
|
||||||
|
Reference in New Issue
Block a user