23 行
592 B
Python
23 行
592 B
Python
"""Storage route handlers."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from backend.routes.common import handle_request
|
|
from backend.services.media_service import MediaService
|
|
from core.identity import RequestContext
|
|
from core.security import require_authenticated
|
|
|
|
|
|
def get_storage_status(
|
|
ctx: RequestContext,
|
|
service: MediaService | None = None,
|
|
) -> dict:
|
|
media_service = service or MediaService()
|
|
|
|
def action() -> dict[str, Any]:
|
|
require_authenticated(ctx)
|
|
return media_service.storage_status()
|
|
|
|
return handle_request(ctx, action)
|