add option to have external port
Some checks failed
Go / check-formatting (push) Has been cancelled
Go / build-and-test (push) Has been cancelled
Go / build-docker-images (push) Has been cancelled

This commit is contained in:
Gergely Hegedus 2025-01-19 15:18:16 +02:00
parent 3a2096345d
commit 6ef61fe1af
6 changed files with 61 additions and 25 deletions

View file

@ -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)