klg-asutk-app/backend/app/api/routes/audit.py
Yuriy 0150aba4f5 Consolidation: KLG ASUTK + PAPA integration
- Unify API: lib/api.ts uses /api/v1, inbox uses /api/inbox (rewrites)
- Remove localhost refs: openapi, inbox page
- Add rewrites: /api/inbox|tmc -> inbox-server, /api/v1 -> FastAPI
- Add stub routes: knowledge/insights, recommendations, search, log-error
- Transfer from PAPA: prompts (inspection, tmc), scripts, supabase, data/tmc-requests
- Fix inbox-server: ORDER BY created_at, package.json
- Remove redundant app/api/inbox/files route (rewrites handle it)
- knowledge/ in gitignore (large PDFs)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 17:18:31 +03:00

24 lines
891 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Журналирование событий (p.4.1.5 ТЗ).
Заглушка: полный audit_log будет реализован при наличии таблицы audit_events.
"""
from fastapi import APIRouter, Depends, Query
from typing import List
from datetime import datetime
from app.core.auth import get_current_user
router = APIRouter(tags=["audit"])
@router.get("/audit/events")
def list_audit_events(
entity_type: str | None = Query(None, description="Фильтр по типу сущности"),
entity_id: str | None = Query(None, description="Фильтр по ID сущности"),
user=Depends(get_current_user),
):
"""Список событий аудита. Заглушка — возвращает пустой список."""
# TODO: подключить таблицу audit_events и реальные данные
return []