Skip to content

Commit

Permalink
refactors routes
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed May 21, 2024
1 parent ff4859f commit ae9dbd2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/routes/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ async def simulate_env(env_id: str) -> "EnvSummary":
## Args
``` env_id: str ```
"""
return await EnvController.simulate(env_id)
return await EnvController.simulate_env(env_id)
2 changes: 1 addition & 1 deletion lib/routes/flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def read_rocketpy_flight(flight_id: int) -> "FlightPickle":
## Args
``` flight_id: Flight ID hash. ```
"""
return await FlightController.get_rocketpy_flight(flight_id)
return await FlightController.get_rocketpy_flight_as_jsonpickle(flight_id)


@router.put("/{flight_id}/env")
Expand Down
4 changes: 2 additions & 2 deletions lib/routes/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def read_rocketpy_motor(motor_id: int) -> "MotorPickle":
## Args
``` motor_id: Motor ID hash ```
"""
return await MotorController.get_rocketpy_motor(motor_id)
return await MotorController.get_rocketpy_motor_as_jsonpickle(motor_id)


@router.get("/{motor_id}/simulate")
Expand All @@ -93,4 +93,4 @@ async def simulate_motor(motor_id: int) -> "MotorSummary":
## Args
``` motor_id: Motor ID hash ```
"""
return await MotorController.simulate(motor_id)
return await MotorController.simulate_motor(motor_id)
2 changes: 1 addition & 1 deletion lib/routes/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ async def simulate_rocket(rocket_id: int) -> "RocketSummary":
## Args
``` rocket_id: Rocket ID hash ```
"""
return await RocketController.simulate(rocket_id)
return await RocketController.simulate_rocket(rocket_id)

0 comments on commit ae9dbd2

Please sign in to comment.