Add admin panel, WebSocket support, and API versioning
CI / Lint & Format (push) Failing after 28s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 8s
CI / Docker Build (push) Has been skipped

Introduce an admin portal (React + Nginx), WebSocket routing, and
API versioning middleware with `/api/v1/` prefix deprecation.
Add master API key authentication, new Prometheus metrics for AI
token consumption and active WebSockets, and extend S3 config
with a public endpoint URL. Update test paths and fixtures to
align with the new routing structure.
This commit is contained in:
2026-06-22 11:25:22 -04:00
parent d68deb9c74
commit 2f2a5e9b4a
158 changed files with 64811 additions and 503 deletions
+7 -7
View File
@@ -1,6 +1,7 @@
import pytest
from fastapi import HTTPException
from app.services.storage import save_upload, delete_files, get_image_url
from app.services.storage import save_upload, delete_files
from app.services.storage_backend import LocalStorage, S3Storage
from unittest.mock import MagicMock, patch, AsyncMock
import io
@@ -38,9 +39,8 @@ def test_delete_files_exists(tmp_path):
assert not f1.exists()
assert not f2.exists()
def test_get_image_url():
url = get_image_url("img.jpg", "client1")
assert "/static/uploads/client1/img.jpg" in url
thumb_url = get_image_url("img.jpg", "client1", thumb=True)
assert "/static/thumbnails/client1/img.jpg" in thumb_url
@pytest.mark.asyncio
async def test_get_signed_url():
storage = LocalStorage("/", "test_secret")
url = await storage.get_signed_url("uploads/client1/img.jpg")
assert url.startswith("/files/signed/")