Files
CIAgent/apps/api/app/services/snapshot_service.py
T
saksham 1a4c80958f 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).
2026-08-05 10:48:20 -04:00

21 lines
698 B
Python

"""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)