fix: typing issues

This commit is contained in:
swve 2022-12-26 00:16:00 +01:00
parent 193b3b289f
commit 9cd1ec35cf
5 changed files with 24 additions and 24 deletions

View file

@ -94,14 +94,15 @@ async def get_video_file(file_id: str, current_user: PublicUser):
video_file = photos.find_one({"file_id": file_id})
# check media type
if video_file.format not in ["mp4", "webm", "ogg"]:
raise HTTPException(
status_code=status.HTTP_409_CONFLICT, detail="Video file format not supported")
# TODO : check if user has access to file
if video_file:
# check media type
if video_file.format not in ["mp4", "webm", "ogg"]:
raise HTTPException(
status_code=status.HTTP_409_CONFLICT, detail="Video file format not supported")
# stream file
video_file = VideoFile(**video_file)
file_format = video_file.file_format