scraper webhooks
This commit is contained in:
@@ -17,6 +17,7 @@ var SECRET string
|
||||
var DB_NAME string
|
||||
var DiscordWebhook string
|
||||
var ADMIN_SECRET string
|
||||
var ScraperWebhook string
|
||||
|
||||
func ConnectToDB() {
|
||||
db, err := gorm.Open(sqlite.Open(DB_NAME), &gorm.Config{})
|
||||
@@ -35,7 +36,8 @@ type Configuration struct {
|
||||
Secret string `yaml:"secret"`
|
||||
DB string `yaml:"db"`
|
||||
DiscordWebhook string `yaml:"discordWebhook"`
|
||||
ADMIN_SECRET string `yaml:"adminSecret"`
|
||||
ADMIN_SECRET string `yaml:"adminSecret"`
|
||||
ScraperWebhook string `yaml:"scraperWebhook"`
|
||||
}
|
||||
|
||||
func Load() {
|
||||
@@ -58,4 +60,5 @@ file, err := os.ReadFile("config.yaml")
|
||||
DB_NAME = configuration.DB
|
||||
DiscordWebhook = configuration.DiscordWebhook
|
||||
ADMIN_SECRET = configuration.ADMIN_SECRET
|
||||
ScraperWebhook = configuration.ScraperWebhook
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user