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

View File

@ -102,6 +102,12 @@ def install(app_name):
@app.route("/deploy/<app_name>", methods=["POST"]) @app.route("/deploy/<app_name>", methods=["POST"])
def deploy(app_name): def deploy(app_name):
"""Deployment end-point for an app.""" """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) environment = get_loaded_env(app_name, request.form)
# Note(decentral1se): how to handle the following? # Note(decentral1se): how to handle the following?