add option to have external port
This commit is contained in:
parent
3a2096345d
commit
6ef61fe1af
6 changed files with 61 additions and 25 deletions
|
|
@ -3,10 +3,11 @@ package main
|
|||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/boltcard/boltcard/db"
|
||||
"github.com/boltcard/boltcard/resp_err"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +56,12 @@ func new_card_request(w http.ResponseWriter, req *http.Request) {
|
|||
|
||||
a := params_a[0]
|
||||
|
||||
lnurlw_base := "lnurlw://" + db.Get_setting("HOST_DOMAIN") + "/ln"
|
||||
hostdomainPort := db.Get_setting("HOST_DOMAIN_PORT")
|
||||
hostdomainsuffix := ""
|
||||
if hostdomainPort != "" {
|
||||
hostdomainsuffix = ":" + hostdomainPort
|
||||
}
|
||||
lnurlw_base := "lnurlw://" + db.Get_setting("HOST_DOMAIN") + hostdomainsuffix + "/ln"
|
||||
|
||||
c, err := db.Get_new_card(a)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue