feat: Add audio extraction endpoints and refactor sound API routes
This commit is contained in:
19
app/api/v1/admin/extractions.py
Normal file
19
app/api/v1/admin/extractions.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Admin audio extraction API endpoints."""
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from app.core.dependencies import get_admin_user
|
||||
from app.models.user import User
|
||||
from app.services.extraction_processor import extraction_processor
|
||||
|
||||
router = APIRouter(prefix="/extractions", tags=["admin-extractions"])
|
||||
|
||||
|
||||
@router.get("/status")
|
||||
async def get_extraction_processor_status(
|
||||
current_user: Annotated[User, Depends(get_admin_user)], # noqa: ARG001
|
||||
) -> dict:
|
||||
"""Get the status of the extraction processor. Admin only."""
|
||||
return extraction_processor.get_status()
|
||||
Reference in New Issue
Block a user