feat:初始化工程

This commit is contained in:
2025-10-19 22:16:27 +08:00
commit cb1a26b270
41 changed files with 657 additions and 0 deletions

6
apis/__init__.py Normal file
View File

@@ -0,0 +1,6 @@
from fastapi import FastAPI
from .log import router as log_router
def register_routers(app: FastAPI):
app.include_router(log_router, prefix="")

Binary file not shown.

Binary file not shown.

15
apis/log.py Normal file
View File

@@ -0,0 +1,15 @@
from fastapi import APIRouter
from schemas.log_alert import LogAlertTrigger
from service import log_alert_service
router = APIRouter(
prefix="/log-alter",
tags=["日志告警"],
responses={404: {"description": "Not found"}}
)
@router.post("", summary="触发日志告警")
def trigger_log_alter(log_alter: LogAlertTrigger):
return log_alert_service.trigger_alert(log_alter)