This commit is contained in:
jxxghp
2023-06-17 17:34:18 +08:00
parent f85e960fa9
commit acdec220f7
42 changed files with 423 additions and 253 deletions

View File

@ -3,7 +3,7 @@ from typing import Any
from fastapi import APIRouter, BackgroundTasks, Request
from app import schemas
from app.chain.webhook_message import WebhookMessageChain
from app.chain.webhook import WebhookChain
from app.core.config import settings
router = APIRouter()
@ -13,11 +13,12 @@ def start_webhook_chain(body: Any, form: Any, args: Any):
"""
启动链式任务
"""
WebhookMessageChain().process(body=body, form=form, args=args)
WebhookChain().message(body=body, form=form, args=args)
@router.post("/", response_model=schemas.Response)
async def webhook_message(background_tasks: BackgroundTasks, token: str, request: Request):
async def webhook_message(background_tasks: BackgroundTasks,
token: str, request: Request) -> Any:
"""
Webhook响应
"""