This commit is contained in:
Vladislav 2026-07-23 03:41:16 -04:00
parent 546e4dff46
commit dc796ca4fc

6
vk.py
View File

@ -98,7 +98,8 @@ async def get_images(db_name: str, file_ids: list, sign_avatar: bool = True):
return images
# async def send_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True):
# async def send_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True): TODO
@router.post("/send")
async def send_vk(data:dict, request: Request):
auth = request.headers.get("Authorization")
@ -165,6 +166,7 @@ async def send_vk(data:dict, request: Request):
# async def edit_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True): TODO
@router.post("/edit")
async def edit_vk(data:dict, request: Request):
auth = request.headers.get("Authorization")
@ -179,7 +181,6 @@ async def edit_vk(data:dict, request: Request):
doc = data['doc']
post_id = data['post_id']
sign_avatar = data['sign_avatar']
# async def edit_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True):
db_name = item.get('db')
if db_name == 'competitions':
social = await social_collection.find_one({'service': True, 'type':'vk'})
@ -234,6 +235,7 @@ async def edit_vk(data:dict, request: Request):
# TODO сделать вызов функции из @celery_app_vk.task( а не по url в router
@router.post("/delete")
async def wall_delete(data: dict, request: Request):
# ---- auth ----