mirror of
https://github.com/Xevion/glance.git
synced 2025-12-07 03:15:14 -06:00
Allow empty check URL
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user