🎨 Use Endpoint for network connectivity checks when syncing with third-party cloud providers https://github.com/siyuan-note/siyuan/issues/7805

This commit is contained in:
Liang Ding 2023-03-29 14:43:02 +08:00
parent 0f912cf1b3
commit 2b58079d94
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 43 additions and 61 deletions

View file

@ -156,20 +156,6 @@ func NormalizeEndpoint(endpoint string) string {
return endpoint
}
func NormalizeCheckURL(checkURL string) string {
checkURL = strings.TrimSpace(checkURL)
if "" == checkURL {
return ""
}
if !strings.HasPrefix(checkURL, "http://") && !strings.HasPrefix(checkURL, "https://") {
checkURL = "http://" + checkURL
}
if !IsValidURL(checkURL) {
return ""
}
return checkURL
}
func FilterMoveDocFromPaths(fromPaths []string, toPath string) (ret []string) {
tmp := FilterSelfChildDocs(fromPaths)
for _, fromPath := range tmp {