feat: Add dashboard API endpoints and service for sound statistics
Some checks failed
Backend CI / lint (push) Failing after 4m52s
Backend CI / test (push) Failing after 3m42s

This commit is contained in:
JSC
2025-08-11 11:16:45 +02:00
parent bb1f036caa
commit 49ad6c8581
5 changed files with 133 additions and 0 deletions

View File

@@ -9,7 +9,9 @@ from app.core.database import get_db
from app.core.logging import get_logger
from app.models.user import User
from app.services.auth import AuthService
from app.services.dashboard import DashboardService
from app.services.oauth import OAuthService
from app.repositories.sound import SoundRepository
from app.utils.auth import JWTUtils, TokenUtils
logger = get_logger(__name__)
@@ -184,3 +186,11 @@ async def get_admin_user(
detail="Not enough permissions",
)
return current_user
async def get_dashboard_service(
session: Annotated[AsyncSession, Depends(get_db)],
) -> DashboardService:
"""Get the dashboard service."""
sound_repository = SoundRepository(session)
return DashboardService(sound_repository)