From 941ebe60c6b6fc2a167621b50548644cb4cec0b8 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 30 Aug 2021 16:10:26 -0300 Subject: [PATCH] fix placeholder: username@domain.com -> actual values. --- grab.html | 2 +- main.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/grab.html b/grab.html index 5c4da76..5c17ed6 100644 --- a/grab.html +++ b/grab.html @@ -37,7 +37,7 @@
Success!
- username@domain.com is your new Lightning Address! + {{ name }}@{{ domain }} is your new Lightning Address!
In order to edit the configuration of this address in the future you diff --git a/main.go b/main.go index ca5ce13..d34c995 100644 --- a/main.go +++ b/main.go @@ -66,7 +66,9 @@ func main() { router.Path("/grab").HandlerFunc( func(w http.ResponseWriter, r *http.Request) { - pin, inv, err := SaveName(r.FormValue("name"), &Params{ + name := r.FormValue("name") + + pin, inv, err := SaveName(name, &Params{ Kind: r.FormValue("kind"), Host: r.FormValue("host"), Key: r.FormValue("key"), @@ -82,7 +84,8 @@ func main() { renderHTML(w, grabHTML, struct { PIN string `json:"pin"` Invoice string `json:"invoice"` - }{pin, inv}) + Name string `json:"name"` + }{pin, inv, name}) }, )