Skip to content

Commit

Permalink
impl replacing domain in url
Browse files Browse the repository at this point in the history
  • Loading branch information
leonlatsch committed May 7, 2024
1 parent 19635f3 commit d53e012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/api/update_url_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type UpdateUrlApiImpl struct {

func (self *UpdateUrlApiImpl) CallUpdateUrl(host string) error {
url := strings.ReplaceAll(self.Config.UpdateUrl, "<host>", host)
url = strings.ReplaceAll(url, "<domain>", self.Config.Domain)
_, err := self.HttpClient.Get(url, nil)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func createEmptyConfig() error {
Domain: "YOUR_DOMAIN",
Hosts: []string{"HOST1", "HOST2"},
Interval: "1h",
Mode: "JOB",
}

if err := SaveConfig(newEmptyConfig); err != nil {
Expand Down

0 comments on commit d53e012

Please sign in to comment.