Skip to content

Commit

Permalink
feat(devbox): receive all params to start devbox
Browse files Browse the repository at this point in the history
  • Loading branch information
arunmathaisk committed Nov 14, 2024
1 parent 5fc82d1 commit 0857e35
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions agent/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,9 +1324,18 @@ def new_devbox():
return {"job": job}


@application.route("/devboxes/<string:devbox_name>/<int:websockify_port>/start", methods=["POST"])
def start_devbox(devbox_name: str, websockify_port: int):
job = Server().start_devbox(devbox_name=devbox_name, websockify_port=websockify_port)
@application.route("/devboxes/<string:devbox_name>/start", methods=["POST"])
def start_devbox(devbox_name: str):
data = request.json
job = Server().start_devbox(
devbox_name=devbox_name,
vnc_password=data.get("vnc_password"),
codeserver_password=data.get("codeserver_password"),
websockify_port=data.get("websockify_port"),
vnc_port=data.get("vnc_port"),
codeserver_port=data.get("codeserver_port"),
browser_port=data.get("browser_port"),
)
return {"job": job}


Expand Down

0 comments on commit 0857e35

Please sign in to comment.