refactor: extract all routes to app/api/v1/endpoints/ with proper structure

This commit is contained in:
Сергей Антропов
2025-08-20 16:48:06 +03:00
parent 1e6149107d
commit 40f614304b
11 changed files with 1193 additions and 1153 deletions

26
app/api/v1/router.py Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
LogBoard+ - API Router
Автор: Сергей Антропов
Сайт: https://devops.org.ru
"""
from fastapi import APIRouter
from .endpoints import auth, logs, containers, websocket, pages
# Создаем основной роутер API v1
api_router = APIRouter(prefix="/api", tags=["api"])
# Подключаем маршруты страниц (без префикса /api)
pages_router = APIRouter(tags=["pages"])
# Подключаем все маршруты
api_router.include_router(auth.router, prefix="/auth", tags=["auth"])
api_router.include_router(logs.router, prefix="/logs", tags=["logs"])
api_router.include_router(containers.router, prefix="/containers", tags=["containers"])
api_router.include_router(websocket.router, prefix="/websocket", tags=["websocket"])
# Подключаем маршруты страниц
pages_router.include_router(pages.router)