This commit is contained in:
vladislav 2026-09-07 12:34:35 -04:00
parent 5458c6442a
commit 002235b6f6
Signed by: Vladislav
GPG Key ID: D97C9E5E4860EE45
3 changed files with 6 additions and 2 deletions

View File

@ -1535,7 +1535,8 @@
" ]\n",
"\n",
" cursor = competition_request_col.aggregate(pipeline)\n",
" return await cursor.to_list(length=None)"
" data = await cursor.to_list(length=None)\n",
" return await posts_collection.find({\"_id\": {\"$in\":[ ObjectId(doc['_id']) if type(doc['_id']) is str else doc['_id'] for doc in data ]}}).to_list()"
],
"display_name": ".venv"
},

View File

@ -1186,7 +1186,8 @@ async def get_unique_posts_by_user(
]
cursor = competition_request_col.aggregate(pipeline)
return await cursor.to_list(length=None)
data = await cursor.to_list(length=None)
return await posts_collection.find({"_id": {"$in":[ ObjectId(doc['_id']) if type(doc['_id']) is str else doc['_id'] for doc in data ]}}).to_list()
async def get_unique_posts_с(competition_request_col: AsyncIOMotorCollection, competition_id: str, finish: bool = False) -> List[Any]:
match_criteria = {

2
vk.py
View File

@ -188,6 +188,7 @@ async def send_vk(data:dict, request: Request):
return {"ok": True}
# TODO: function call like send_tg from tg.py (without router)
@router.post("/edit")
async def edit_vk(data:dict, request: Request):
@ -257,6 +258,7 @@ async def edit_vk(data:dict, request: Request):
return {"ok": True}
# TODO: function call like send_tg from tg.py (without router)
@router.post("/delete")
async def wall_delete(data: dict, request: Request):