new features

This commit is contained in:
Daniil
2026-02-27 23:33:56 +03:00
parent 937e58859a
commit dc04efe0fb
41 changed files with 2067 additions and 141 deletions
+15
View File
@@ -67,6 +67,21 @@ async def retrieve_transcription_entry(
return TranscriptionRead.model_validate(transcription)
@router.get("/transcriptions/by-artifact/{artifact_id}/", response_model=TranscriptionRead)
async def retrieve_transcription_by_artifact(
artifact_id: uuid.UUID,
current_user: User = Depends(get_current_user),
db: AsyncSession = Depends(get_db),
) -> TranscriptionRead:
_ = current_user
repo = TranscriptionRepository(db)
transcription = await repo.get_by_artifact_id(artifact_id)
if transcription is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Not found")
return TranscriptionRead.model_validate(transcription)
@router.patch("/transcriptions/{transcription_id}/", response_model=TranscriptionRead)
async def patch_transcription_entry(
transcription_id: uuid.UUID,