if input image file is not configured, return code 200
This commit is contained in:
@@ -241,7 +241,10 @@ class Api:
|
||||
)
|
||||
|
||||
def api_input_image(self) -> FileResponse:
|
||||
if self.config.input and self.config.input.is_file():
|
||||
if self.config.input is None:
|
||||
raise HTTPException(status_code=200, detail="No input image configured")
|
||||
|
||||
if self.config.input.is_file():
|
||||
return FileResponse(self.config.input)
|
||||
raise HTTPException(status_code=404, detail="Input image not found")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user