add another object_search

This commit is contained in:
Valentin CZERYBA 2024-11-04 22:58:51 +01:00
parent 4c2d4646ce
commit 115a5acb6f

View File

@ -55,13 +55,6 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
if min_lat is not None and max_lat is not None and min_lon is not None and max_lon is not None: if min_lat is not None and max_lat is not None and min_lon is not None and max_lon is not None:
object_search = { object_search = {
"$and": [ "$and": [
{
"$or": [
{"name": {"$regex": item}},
{"tags": {"$regex": item}},
{"organizers": {"$regex": item}}
]
},
{"status": {"$eq": status}}, {"status": {"$eq": status}},
{ {
"latitude": {"$gte": min_lat}, # Minimum latitude "latitude": {"$gte": min_lat}, # Minimum latitude