feat: webhook option added for incoming messages

This commit is contained in:
iamatulsingh
2026-03-24 21:23:41 +01:00
parent 84a31a8ae8
commit b136334953
5 changed files with 55 additions and 15 deletions
+6 -3
View File
@@ -14,9 +14,10 @@ type dbConfig struct {
}
type Config struct {
DB dbConfig
JWTSecret []byte
APIKey string
DB dbConfig
JWTSecret []byte
APIKey string
WebhookUrl string
}
func LoadConfig() (*Config, error) {
@@ -45,6 +46,7 @@ func LoadConfig() (*Config, error) {
if !ok {
return nil, fmt.Errorf("missing API_KEY")
}
webhookUrl := os.Getenv("WEBHOOK_URL")
isPostgres := os.Getenv("IS_POSTGRES") == "true"
@@ -58,5 +60,6 @@ func LoadConfig() (*Config, error) {
},
JWTSecret: []byte(jwtSecret),
APIKey: apiKey,
WebhookUrl: webhookUrl,
}, nil
}