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
+8 -2
View File
@@ -8,10 +8,16 @@ def test_dms_to_decimal():
assert _dms_to_decimal(dms, "N") == 48.8566167
assert _dms_to_decimal(dms, "S") == -48.8566167
@pytest.mark.asyncio
@patch("app.services.exif_service.piexif")
@patch("app.services.exif_service.PILImage")
@patch("app.services.exif_service.Path.exists", return_value=True)
def test_extract_exif_success(mock_path_exists, mock_pil, mock_piexif):
@patch("app.services.exif_service.get_storage_backend")
async def test_extract_exif_success(mock_get_storage_backend, mock_path_exists, mock_pil, mock_piexif):
from unittest.mock import AsyncMock
mock_backend = MagicMock()
mock_backend.get_bytes = AsyncMock(return_value=b"fake")
mock_get_storage_backend.return_value = mock_backend
# Mock piexif data
import piexif
mock_data = {
@@ -45,7 +51,7 @@ def test_extract_exif_success(mock_path_exists, mock_pil, mock_piexif):
mock_img = mock_pil.open.return_value.__enter__.return_value
mock_img._getexif.return_value = {271: "Canon"} # 271 is Make
result = extract_exif("fake/path.jpg")
result = await extract_exif("fake/path.jpg")
assert result["make"] == "Canon"
assert result["model"] == "EOS R5"