scraper webhooks
This commit is contained in:
1 parent
1da3dbad27
commit
20e1b99248
3 files changed
+101
-3
No files matched your search
@@ -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