Skip to content

Commit

Permalink
Add a non TDS version
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis authored Jun 26, 2024
1 parent d8d06f8 commit b2c7cc7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/SimulationService.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function start!(; host=HOST[], port=PORT[], kw...)


Oxygen.@get "/model-equation/{id}" modelEquation
Oxygen.@post "/model-equation" modelToEquation

Oxygen.@get "/health" health
Oxygen.@get "/status/{id}" job_status
Expand Down Expand Up @@ -232,6 +233,15 @@ function modelEquation(::HTTP.Request, id::String)
])
end

# POST /model-equation
function modelToEquation(req::HTTP.Request)
sys = amr_get(req.body, ODESystem)
model_latex = latexify(sys)
return Dict([
(:latex, model_latex.s)
])
end


#-----------------------------------------------------------------------------# health: GET /
function health(::HTTP.Request)
Expand Down

0 comments on commit b2c7cc7

Please sign in to comment.