scraper webhooks

This commit is contained in:
Sotirios Pupakis
2025-09-25 00:46:13 +02:00
parent 1da3dbad27
commit 20e1b99248
3 changed files with 101 additions and 3 deletions

View File

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