Try to add validation

This commit is contained in:
Luke Murphy 2020-07-02 12:26:02 +02:00
parent ad31f17888
commit f175a43222
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 6 additions and 0 deletions

View File

@ -102,6 +102,12 @@ def install(app_name):
@app.route("/deploy/<app_name>", methods=["POST"])
def deploy(app_name):
"""Deployment end-point for an app."""
if app_name == "gitea":
form = GiteaInstallForm(request.form)
if not form.validate():
return render_template("install.html", app_name=app_name, form=form)
environment = get_loaded_env(app_name, request.form)
# Note(decentral1se): how to handle the following?