mirror of
https://github.com/glanceapp/glance.git
synced 2024-12-14 08:11:59 +03:00
Allow empty check URL
This commit is contained in:
parent
871ba619a3
commit
457e0539fa
@ -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…
Reference in New Issue
Block a user