This commit is contained in:
2022-06-25 21:20:25 +03:00
parent c24374899c
commit 316c4b9553

View File

@@ -33,9 +33,7 @@ async def convert(
): ):
format_lower = format.lower() format_lower = format.lower()
if format_lower not in ["epub", "mobi"]: if format_lower not in ["epub", "mobi"]:
raise HTTPException( raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST)
status_code=status.HTTP_400_BAD_REQUEST, detail="Wrong format!"
)
temp_uuid = uuid.uuid1() temp_uuid = uuid.uuid1()
@@ -70,9 +68,7 @@ async def convert(
except FileNotFoundError: except FileNotFoundError:
pass pass
raise HTTPException( raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST)
status_code=status.HTTP_400_BAD_REQUEST, detail="Can't convert!"
)
async def result_iterator() -> AsyncIterator[bytes]: async def result_iterator() -> AsyncIterator[bytes]:
try: try: