generated from nathanwoodburn/python-webserver-template
feat: Update redirect location
All checks were successful
Build Docker / BuildImage (push) Successful in 30s
All checks were successful
Build Docker / BuildImage (push) Successful in 30s
This commit is contained in:
parent
2600a46f72
commit
ef2b7611ed
@ -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):
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user