mirror of
https://github.com/flibusta-apps/fb2converter_server.git
synced 2025-12-06 06:55:36 +01:00
Fix
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user