This commit is contained in:
Igor Loskutov
2025-06-19 10:13:57 -04:00
parent 98acf298d6
commit 6cb46dc64f
10 changed files with 59 additions and 31 deletions

View File

@@ -45,6 +45,7 @@ def range_requests_response(
if not os.path.exists(file_path):
from fastapi import HTTPException
raise HTTPException(status_code=404, detail="File not found")
file_size = os.stat(file_path).st_size

View File

@@ -28,16 +28,16 @@ async def meeting_audio_consent(
meeting = await meetings_controller.get_by_id(meeting_id)
if not meeting:
raise HTTPException(status_code=404, detail="Meeting not found")
user_id = user["sub"] if user else None
consent = MeetingConsent(
meeting_id=meeting_id,
user_id=user_id,
consent_given=request.consent_given,
consent_timestamp=datetime.utcnow(),
)
updated_consent = await meeting_consent_controller.upsert(consent)
return {"status": "success", "consent_id": updated_consent.id}
return {"status": "success", "consent_id": updated_consent.id}

View File

@@ -87,8 +87,10 @@ async def transcript_get_audio_mp3(
)
if transcript.audio_deleted:
raise HTTPException(status_code=404, detail="Audio unavailable due to privacy settings")
raise HTTPException(
status_code=404, detail="Audio unavailable due to privacy settings"
)
if not transcript.audio_mp3_filename.exists():
raise HTTPException(status_code=404, detail="Audio file not found")