Allow empty check URL

This commit is contained in:
MrExplode 2024-08-03 14:14:24 +02:00
parent 871ba619a3
commit 457e0539fa
No known key found for this signature in database
GPG Key ID: 1B90A9BD4F42D6D9

View File

@ -21,7 +21,13 @@ type SiteStatus struct {
}
func getSiteStatusTask(statusRequest *SiteStatusRequest) (SiteStatus, error) {
request, err := http.NewRequest(http.MethodGet, statusRequest.CheckURL, nil)
var url string
if statusRequest.CheckURL != "" {
url = statusRequest.CheckURL
} else {
url = statusRequest.URL
}
request, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return SiteStatus{