This commit is contained in:
Vladislav 2026-07-22 21:14:49 -04:00
parent 8631a3c68f
commit 3850e58e47
3 changed files with 18 additions and 2 deletions

View File

@ -483,6 +483,20 @@
"#!rsync -avz ./static kultmost:/var/www/static/"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fc4aa1ca",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [],
"source": [
"!echo $(git branch --show-current)"
]
},
{
"cell_type": "code",
"execution_count": null,

View File

@ -169,6 +169,7 @@
"metadata": {},
"outputs": [],
"source": [
"# async def send_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True): TODO\n",
"@router.post(\"/send\")\n",
"async def send_vk(data:dict, request: Request):\n",
" auth = request.headers.get(\"Authorization\")\n",
@ -242,6 +243,7 @@
"metadata": {},
"outputs": [],
"source": [
"# async def edit_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True): TODO\n",
"@router.post(\"/edit\")\n",
"async def edit_vk(data:dict, request: Request):\n",
" auth = request.headers.get(\"Authorization\")\n",
@ -256,7 +258,6 @@
" doc = data['doc']\n",
" post_id = data['post_id']\n",
" sign_avatar = data['sign_avatar']\n",
"# async def edit_vk(item: dict, text: str, file_ids: list, doc: dict, sign_avatar: bool = True):\n",
" db_name = item.get('db')\n",
" if db_name == 'competitions':\n",
" social = await social_collection.find_one({'service': True, 'type':'vk'})\n",
@ -318,6 +319,7 @@
"metadata": {},
"outputs": [],
"source": [
"# TODO сделать вызов функции из @celery_app_vk.task( а не по url в router\n",
"@router.post(\"/delete\")\n",
"async def wall_delete(data: dict, request: Request):\n",
" # ---- auth ----\n",

2
vk.py
View File

@ -98,7 +98,7 @@ 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):
@router.post("/send")
async def send_vk(data:dict, request: Request):
auth = request.headers.get("Authorization")