Refactor API Docs CI workflow to correct ESLint command syntax and enhance Python formatting in CI pipelines; update progress tracking documentation
Some checks failed
API Docs (Node.js Express) / test (16) (push) Failing after 5m29s
API Docs (Node.js Express) / test (18) (push) Failing after 5m25s
API Docs (Node.js Express) / test (20) (push) Failing after 1m4s
API Docs (Node.js Express) / build (push) Has been skipped
API Docs (Node.js Express) / security (push) Has been skipped
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 4m52s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 5m1s
LabFusion CI/CD Pipeline / api-docs (push) Failing after 5m12s
LabFusion CI/CD Pipeline / frontend (push) Failing after 6m39s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
LabFusion CI/CD Pipeline / security-scan (push) Has been skipped
Docker Build and Push / build-and-push (push) Failing after 34s
Docker Build and Push / security-scan (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 1m33s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 35s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 5m20s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 5m27s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 5m50s
Docker Build and Push / deploy-staging (push) Has been skipped
Service Adapters (Python FastAPI) / build (push) Has been skipped
Service Adapters (Python FastAPI) / security (push) Has been skipped
Docker Build and Push / deploy-production (push) Has been skipped
Some checks failed
API Docs (Node.js Express) / test (16) (push) Failing after 5m29s
API Docs (Node.js Express) / test (18) (push) Failing after 5m25s
API Docs (Node.js Express) / test (20) (push) Failing after 1m4s
API Docs (Node.js Express) / build (push) Has been skipped
API Docs (Node.js Express) / security (push) Has been skipped
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 4m52s
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 5m1s
LabFusion CI/CD Pipeline / api-docs (push) Failing after 5m12s
LabFusion CI/CD Pipeline / frontend (push) Failing after 6m39s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
LabFusion CI/CD Pipeline / security-scan (push) Has been skipped
Docker Build and Push / build-and-push (push) Failing after 34s
Docker Build and Push / security-scan (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 1m33s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 35s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 5m20s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 5m27s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 5m50s
Docker Build and Push / deploy-staging (push) Has been skipped
Service Adapters (Python FastAPI) / build (push) Has been skipped
Service Adapters (Python FastAPI) / security (push) Has been skipped
Docker Build and Push / deploy-production (push) Has been skipped
This commit is contained in:
@@ -1,27 +1,32 @@
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from models.schemas import ImmichAssetsResponse, ImmichAsset
|
||||
from services.config import SERVICES
|
||||
from datetime import datetime
|
||||
|
||||
from fastapi import APIRouter, HTTPException
|
||||
|
||||
from models.schemas import ImmichAsset, ImmichAssetsResponse
|
||||
from services.config import SERVICES
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/immich/assets",
|
||||
response_model=ImmichAssetsResponse,
|
||||
summary="Get Immich Assets",
|
||||
description="Retrieve photo assets from Immich",
|
||||
responses={
|
||||
200: {"description": "Successfully retrieved assets"},
|
||||
503: {"description": "Immich integration not configured"}
|
||||
},
|
||||
tags=["Immich"])
|
||||
|
||||
@router.get(
|
||||
"/immich/assets",
|
||||
response_model=ImmichAssetsResponse,
|
||||
summary="Get Immich Assets",
|
||||
description="Retrieve photo assets from Immich",
|
||||
responses={
|
||||
200: {"description": "Successfully retrieved assets"},
|
||||
503: {"description": "Immich integration not configured"},
|
||||
},
|
||||
tags=["Immich"],
|
||||
)
|
||||
async def get_immich_assets():
|
||||
"""Get Immich photo assets including metadata, tags, and face detection results"""
|
||||
if not SERVICES["immich"]["enabled"]:
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
detail="Immich integration not configured. Please set IMMICH_API_KEY environment variable."
|
||||
status_code=503,
|
||||
detail="Immich integration not configured. Please set IMMICH_API_KEY environment variable.",
|
||||
)
|
||||
|
||||
|
||||
# This would make actual API calls to Immich
|
||||
# For now, return mock data
|
||||
return ImmichAssetsResponse(
|
||||
@@ -31,32 +36,35 @@ async def get_immich_assets():
|
||||
filename="photo_001.jpg",
|
||||
created_at=datetime.now().isoformat(),
|
||||
tags=["person", "outdoor"],
|
||||
faces=["Alice", "Bob"]
|
||||
faces=["Alice", "Bob"],
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
@router.get("/immich/albums",
|
||||
summary="Get Immich Albums",
|
||||
description="Get list of Immich albums",
|
||||
responses={
|
||||
200: {"description": "Successfully retrieved albums"},
|
||||
503: {"description": "Immich integration not configured"}
|
||||
},
|
||||
tags=["Immich"])
|
||||
|
||||
@router.get(
|
||||
"/immich/albums",
|
||||
summary="Get Immich Albums",
|
||||
description="Get list of Immich albums",
|
||||
responses={
|
||||
200: {"description": "Successfully retrieved albums"},
|
||||
503: {"description": "Immich integration not configured"},
|
||||
},
|
||||
tags=["Immich"],
|
||||
)
|
||||
async def get_immich_albums():
|
||||
"""Get list of Immich albums"""
|
||||
if not SERVICES["immich"]["enabled"]:
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
detail="Immich integration not configured. Please set IMMICH_API_KEY environment variable."
|
||||
status_code=503,
|
||||
detail="Immich integration not configured. Please set IMMICH_API_KEY environment variable.",
|
||||
)
|
||||
|
||||
|
||||
# This would make actual API calls to Immich
|
||||
# For now, return mock data
|
||||
return {
|
||||
"albums": [
|
||||
{"id": "album_1", "name": "Family Photos", "asset_count": 150},
|
||||
{"id": "album_2", "name": "Vacation 2024", "asset_count": 75}
|
||||
{"id": "album_2", "name": "Vacation 2024", "asset_count": 75},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user