mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-07-12 01:29:32 -04:00
add donations to config
This commit is contained in:
parent
1d0c1315d8
commit
d6e6592171
2 changed files with 12 additions and 0 deletions
|
@ -6,6 +6,13 @@ type Config struct {
|
|||
Cache bool
|
||||
Scraper bool
|
||||
ListenAddr string
|
||||
Donations Donations
|
||||
}
|
||||
|
||||
type Donations struct {
|
||||
Xmr string
|
||||
Btc string
|
||||
Lnn string
|
||||
}
|
||||
|
||||
var Conf Config
|
||||
|
|
|
@ -70,6 +70,11 @@ func init() {
|
|||
log.Info().Msg("No .env file found, using environment variables")
|
||||
}
|
||||
|
||||
// Load donation addresses into config
|
||||
config.Conf.Donations.Xmr = os.Getenv("XMR_ADDRESS")
|
||||
config.Conf.Donations.Btc = os.Getenv("BTC_ADDRESS")
|
||||
config.Conf.Donations.Lnn = os.Getenv("LNN_ADDRESS")
|
||||
|
||||
// Database init
|
||||
log.Info().Msg("Initializing database.")
|
||||
database.InitPocketbase()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue