Init All Docs
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package config
|
||||
|
||||
import "eslogad-be/config"
|
||||
|
||||
type NovuConfig struct {
|
||||
APIKey string
|
||||
ApplicationID string
|
||||
BaseURL string
|
||||
IncomingLetterWorkflowID string
|
||||
}
|
||||
|
||||
func LoadNovuConfig(cfg *config.Config) *NovuConfig {
|
||||
baseURL := cfg.Novu.BaseURL
|
||||
if baseURL == "" {
|
||||
baseURL = "https://api.novu.co"
|
||||
}
|
||||
|
||||
// Default workflow ID for incoming letter notifications
|
||||
workflowID := cfg.Novu.IncomingLetterWorkflowID
|
||||
if workflowID == "" {
|
||||
workflowID = "notification-dashbpard"
|
||||
}
|
||||
|
||||
return &NovuConfig{
|
||||
APIKey: cfg.Novu.APIKey,
|
||||
ApplicationID: cfg.Novu.ApplicationID,
|
||||
BaseURL: baseURL,
|
||||
IncomingLetterWorkflowID: workflowID,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user