fix: only enable request when lnd addr is set

This commit is contained in:
Amarpreet Minhas 2023-12-30 20:12:01 -05:00
parent 6460002bb0
commit 277c713e7e

View file

@ -32,8 +32,12 @@ func main() {
// nostr endpoints
l.Debug().Msg("enabling nostr user endpoint")
http.HandleFunc("/.well-known/nostr.json", nostr.GetNostrAddr)
addr := config.GetConfig().LndAddr
if addr != "" {
l.Debug().Msg("enabling nostr request endpoint")
http.HandleFunc("/request/nostr", nostr.RequestNostrAddr)
}
// start server
port := config.GetConfig().ListenAddr