feat: overhaul with modular API, agent endpoints, migrations, backup and tests
- Split monolithic app.py into server/api/ routers - Add Pydantic schemas for input validation - Add /agent/* API with separate AGENT_TOKEN auth - Replace static schema.sql with versioned migrations (datenerhaltend) - Add tools/backup_db.py for SQLite backups - Add Dockerfile HEALTHCHECK and compose.yml AGENT_TOKEN env - Add pytest tests for user and agent API - Update README with API docs and deployment safety notes - Bump version to 1.2.0
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from typing import Any
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
@@ -105,7 +105,7 @@ async def _recent_roasts(
|
||||
before_day: str,
|
||||
days: int = ROAST_HISTORY_DAYS,
|
||||
) -> list[str]:
|
||||
end = datetime.strptime(before_day, "%Y-%m-%d").date()
|
||||
end = datetime.strptime(before_day, "%Y-%m-%d").replace(tzinfo=UTC).date()
|
||||
roasts: list[str] = []
|
||||
for offset in range(1, days + 1):
|
||||
day = (end - timedelta(days=offset)).isoformat()
|
||||
|
||||
Reference in New Issue
Block a user