Allow empty check URL
This commit is contained in:
parent
871ba619a3
commit
457e0539fa
1 changed files with 7 additions and 1 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Reference in a new issue