feat: Update redirect location
All checks were successful
Build Docker / BuildImage (push) Successful in 30s

This commit is contained in:
Nathan Woodburn 2024-10-03 14:17:50 +10:00
parent 2600a46f72
commit ef2b7611ed
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 4 additions and 2 deletions

View File

@ -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/<path:path>", methods=["POST"])
def renew_path(path: str):

View File

@ -13,6 +13,7 @@
<div class="spacer"></div>
<div class="centre">
<h2 style="color: red;">{{error}}</h2>
<h2 style="color: green;">{{message}}</h2>
<h1>Renew an anyone can renew domain</h1>
<p>This is a service to help anyone renew a domain name.</p>