fix: 已有数据库再次安装时接上原库而不是报错
This commit is contained in:
@@ -37,10 +37,10 @@ def install_status() -> dict:
|
||||
@router.post("/install")
|
||||
def install(body: dict) -> dict:
|
||||
try:
|
||||
perform_install(body)
|
||||
already = perform_install(body)
|
||||
except InstallError as exc:
|
||||
raise _bad(str(exc)) from exc
|
||||
return {"ok": True}
|
||||
return {"ok": True, "already": already}
|
||||
|
||||
|
||||
def _bad(message: str, status: int = 400) -> HTTPException:
|
||||
|
||||
Reference in New Issue
Block a user