Skip to content

Commit

Permalink
fix: correct uri
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Apr 6, 2024
1 parent 3b366f9 commit a6bb1e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,15 +681,15 @@ func LoadConfigFS(fsys afero.Fs) error {
if Config.Auth.Hook.SendSMS.URI == "" {
return errors.New("Missing required field in config: auth.hook.send_sms.uri")
}
if !strings.HasPrefix(Config.Auth.Hook.SendSMS, "http") {
if !strings.HasPrefix(Config.Auth.Hook.SendSMS.URI, "http") {
return errors.New("Invalid HTTP hook config: auth.hook.send_sms.uri should be a http or https URL")
}
}
if Config.Auth.Hook.SendEmail.Enabled {
if Config.Auth.Hook.SendSMS.URI == "" {
if Config.Auth.Hook.SendEmail.URI == "" {
return errors.New("Missing required field in config: auth.hook.custom_access_token.uri")
}
if !strings.HasPrefix(Config.Auth.Hook.SendSMS, "http") {
if !strings.HasPrefix(Config.Auth.Hook.SendEmail.URI, "http") {
return errors.New("Invalid HTTP hook config: auth.hook.send_email.uri should be a http or https URL")
}
}
Expand Down

0 comments on commit a6bb1e2

Please sign in to comment.