github-actions[bot]
Automated Deploy: 0d5b759d8eca219a25b3ab717925e73a66bbf4a4
2756f0f
Raw History Blame Contribute Delete
568 Bytes
"""D1: presigned upload targets for the clip and its thumbnail."""
from fastapi import APIRouter
from app.core.dependencies import CurrentAccount, Db, Storage
from app.modules.uploads.schemas import UploadIn, UploadOut
from app.modules.uploads.service import UploadService
router = APIRouter(prefix="/v1", tags=["uploads"])
@router.post("/uploads", status_code=201, response_model=UploadOut)
async def create_upload(body: UploadIn, account: CurrentAccount, db: Db, storage: Storage) -> UploadOut:
return await UploadService(db, storage).create(account, body)