More testing
This commit is contained in:
parent
5c35f2daac
commit
5f78b2d68c
1 changed files with 8 additions and 1 deletions
|
@ -50,6 +50,12 @@ func RequestNostrAddr(w http.ResponseWriter, r *http.Request) {
|
||||||
w.WriteHeader(http.StatusConflict)
|
w.WriteHeader(http.StatusConflict)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
rKey = getRkey("requested", r.FormValue("Name"), getHostname(r.Host))
|
||||||
|
exists = redisCli.Client.Exists(ctx, rKey)
|
||||||
|
if exists.Val() == 1 {
|
||||||
|
w.WriteHeader(http.StatusConflict)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// get the hexkey
|
// get the hexkey
|
||||||
hexKey, err := convertNpubToHex(r.FormValue("Key"))
|
hexKey, err := convertNpubToHex(r.FormValue("Key"))
|
||||||
|
@ -76,7 +82,8 @@ func RequestNostrAddr(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// generate the payment request
|
// generate the payment request
|
||||||
exp := time.Until(time.Now().Add(time.Minute * 15))
|
exp := time.Until(time.Now().Add(time.Minute * 15))
|
||||||
paymentReq, err := lnd.Request(rKey, jsonUser, exp)
|
// paymentReq, err := lnd.Request(rKey, jsonUser, exp)
|
||||||
|
_, err = lnd.Request(rKey, jsonUser, exp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.WriteHeader(http.StatusServiceUnavailable)
|
w.WriteHeader(http.StatusServiceUnavailable)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue