Initial commit: CI Agent competitive-intelligence monitoring app
FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Read-only snapshot history for a company. Snapshots themselves are only
|
||||
ever written by collection_service.py during a monitoring run - this module
|
||||
just lists what's already there, ownership-checked."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.models.snapshot import Snapshot
|
||||
from app.repositories.source_repository import SnapshotRepository
|
||||
from app.services import company_service
|
||||
|
||||
|
||||
async def list_snapshots(
|
||||
db: AsyncSession, user_id: uuid.UUID, company_id: uuid.UUID
|
||||
) -> list[Snapshot]:
|
||||
await company_service.get_company(db, user_id, company_id)
|
||||
return await SnapshotRepository(db).list_for_company(company_id)
|
||||
Reference in New Issue
Block a user