discord embed changes
This commit is contained in:
@@ -16,6 +16,7 @@ var IP string
|
||||
var SECRET string
|
||||
var DB_NAME string
|
||||
var DiscordWebhook string
|
||||
var ADMIN_SECRET string
|
||||
|
||||
func ConnectToDB() {
|
||||
db, err := gorm.Open(sqlite.Open(DB_NAME), &gorm.Config{})
|
||||
@@ -34,6 +35,7 @@ type Configuration struct {
|
||||
Secret string `yaml:"secret"`
|
||||
DB string `yaml:"db"`
|
||||
DiscordWebhook string `yaml:"discordWebhook"`
|
||||
ADMIN_SECRET string `yaml:"adminSecret"`
|
||||
}
|
||||
|
||||
func Load() {
|
||||
@@ -55,4 +57,5 @@ file, err := os.ReadFile("config.yaml")
|
||||
SECRET = configuration.Secret
|
||||
DB_NAME = configuration.DB
|
||||
DiscordWebhook = configuration.DiscordWebhook
|
||||
ADMIN_SECRET = configuration.ADMIN_SECRET
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user