Skip to content

Commit

Permalink
updated main server
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Mar 21, 2024
1 parent 193b3af commit a90723f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 3 deletions.
4 changes: 2 additions & 2 deletions editor-api/archive_editor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ async def edit_simulation(
edited_file_path = os.path.join(edited_files_storage, f"{new_omex_filename}.omex")
shutil.move(file_path, edited_file_path)

return SuccessfulSimulationEditConfirmation(download_link=f"/download/{edited_file_path}")
return SuccessfulSimulationEditConfirmation(download_link=f"/download/{edited_file_path}").model_dump()
except Exception as e:
result = UnsuccessfulSimulationEditConfirmation(
error=HTTPException(status_code=500, detail=str(e)),
exception=e)
# raise HTTPException(status_code=500, detail=str(e))
raise result.error
return result.model_dump()


@app.get("/download/{file_identifier}")
Expand Down
71 changes: 70 additions & 1 deletion editor-api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a90723f

Please sign in to comment.