Refactor sound and extraction services to include user and timestamp fields
- Updated ExtractionInfo to include user_id, created_at, and updated_at fields. - Modified ExtractionService to return user and timestamp information in extraction responses. - Enhanced sound serialization in PlayerState to include extraction URL if available. - Adjusted PlaylistRepository to load sound extractions when retrieving playlist sounds. - Added tests for new fields in extraction and sound endpoints, ensuring proper response structure. - Created new test file endpoints for sound downloads and thumbnail retrievals, including success and error cases. - Refactored various test cases for consistency and clarity, ensuring proper mocking and assertions.
This commit is contained in:
@@ -2,7 +2,17 @@
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.api.v1 import admin, auth, extractions, main, player, playlists, socket, sounds
|
||||
from app.api.v1 import (
|
||||
admin,
|
||||
auth,
|
||||
extractions,
|
||||
files,
|
||||
main,
|
||||
player,
|
||||
playlists,
|
||||
socket,
|
||||
sounds,
|
||||
)
|
||||
|
||||
# V1 API router with v1 prefix
|
||||
api_router = APIRouter(prefix="/v1")
|
||||
@@ -10,6 +20,7 @@ api_router = APIRouter(prefix="/v1")
|
||||
# Include all route modules
|
||||
api_router.include_router(auth.router, tags=["authentication"])
|
||||
api_router.include_router(extractions.router, tags=["extractions"])
|
||||
api_router.include_router(files.router, tags=["files"])
|
||||
api_router.include_router(main.router, tags=["main"])
|
||||
api_router.include_router(player.router, tags=["player"])
|
||||
api_router.include_router(playlists.router, tags=["playlists"])
|
||||
|
||||
Reference in New Issue
Block a user