From ef2b7611ed10d535254c119e081226a8ab7df632 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 3 Oct 2024 14:17:50 +1000 Subject: [PATCH] feat: Update redirect location --- server.py | 5 +++-- templates/index.html | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 23d74cf..b5576cc 100644 --- a/server.py +++ b/server.py @@ -86,7 +86,8 @@ def wellknown(path): def index(): if request.args.get("error"): return render_template("index.html", error=errors[request.args.get("error")]) - + if request.args.get("message"): + return render_template("index.html", message=request.args.get("message")) return render_template("index.html") @app.route("/renew", methods=["POST"]) @@ -117,7 +118,7 @@ def renew(): if req["data"]["owner_tx_data"]["address"] not in allowed_owners: return redirect("/?error=not_anyone") - return redirect(f"https://pay.hns.au/p/renew?amount=10&data={domain}&redirect=https://renew.hns.au") + return redirect(f"https://pay.hns.au/p/renew?amount=10&data={domain}&redirect=https://renew.hns.au/?message=Success:%20the%20domain%20will%20renew%20soon") @app.route("/renew/", methods=["POST"]) def renew_path(path: str): diff --git a/templates/index.html b/templates/index.html index 478d58f..2601c18 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,6 +13,7 @@

{{error}}

+

{{message}}

Renew an anyone can renew domain

This is a service to help anyone renew a domain name.