From f175a432226d694d2d76bf35182b9b0ceaddc490 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Thu, 2 Jul 2020 12:26:02 +0200 Subject: [PATCH] Try to add validation --- second.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/second.py b/second.py index f49d370..df72dfe 100644 --- a/second.py +++ b/second.py @@ -102,6 +102,12 @@ def install(app_name): @app.route("/deploy/", 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?