Commit 65603605 by baiquan

fix(task): 修复任务回调接口

- 将 DouDianUploadImageAndVideo 任务类型的请求方法从 GET 修改为 POST- 更新了对应的 API 路径,从 getPublishTask 改为 callBackPublishTask
- 此修改解决了任务类型为 DouDianUploadImageAndVideo 时的接口调用问题
parent 186a8051
...@@ -236,7 +236,7 @@ async def callback_task(data: dict, task_type:int): ...@@ -236,7 +236,7 @@ async def callback_task(data: dict, task_type:int):
if task_type == TaskType.DOUDIAN_SHOP_LOGIN: if task_type == TaskType.DOUDIAN_SHOP_LOGIN:
return requests.post(f"{settings.DOMAIN}/api/collection/task", json=data, headers=DEFAULT_HEADER).json() return requests.post(f"{settings.DOMAIN}/api/collection/task", json=data, headers=DEFAULT_HEADER).json()
elif task_type == TaskType.DOUDIAN_UPLOAD_IMAGE_AND_VIDEO: elif task_type == TaskType.DOUDIAN_UPLOAD_IMAGE_AND_VIDEO:
return requests.get(f"{settings.DOMAIN}/api/collection/task/getPublishTask", headers=DEFAULT_HEADER).json() return requests.post(f"{settings.DOMAIN}/api/collection/task/callBackPublishTask", json=data, headers=DEFAULT_HEADER).json()
else: else:
raise Exception(f"未知任务类型 --> {task_type}") raise Exception(f"未知任务类型 --> {task_type}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment