add algam
This commit is contained in:
13
api/main.py
13
api/main.py
@@ -15,7 +15,11 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from database.database import db, get_db_session, init_database, test_db_connection
|
||||
from database.models import User, Message, BotSettings
|
||||
from api.routers import users_router, messages_router, settings_router
|
||||
from api.routers import (
|
||||
users_router, messages_router, settings_router,
|
||||
test_categories_router, tests_router, questions_router,
|
||||
answer_options_router, images_router
|
||||
)
|
||||
from api.schemas import HealthCheckResponse, RootResponse
|
||||
from api.config import config
|
||||
|
||||
@@ -70,6 +74,13 @@ app.include_router(users_router, prefix=config.API_V1_PREFIX)
|
||||
app.include_router(messages_router, prefix=config.API_V1_PREFIX)
|
||||
app.include_router(settings_router, prefix=config.API_V1_PREFIX)
|
||||
|
||||
# Подключение роутеров для системы тестирования
|
||||
app.include_router(test_categories_router, prefix=config.API_V1_PREFIX)
|
||||
app.include_router(tests_router, prefix=config.API_V1_PREFIX)
|
||||
app.include_router(questions_router, prefix=config.API_V1_PREFIX)
|
||||
app.include_router(answer_options_router, prefix=config.API_V1_PREFIX)
|
||||
app.include_router(images_router, prefix=config.API_V1_PREFIX)
|
||||
|
||||
@app.get("/", response_model=RootResponse)
|
||||
async def root():
|
||||
"""Корневой эндпоинт"""
|
||||
|
||||
Reference in New Issue
Block a user