fix(external-endpoints): prevent the creation of an invalid file endpoint (#1021)

pull/1024/head
Anthony Lapenna 2017-07-12 15:15:42 +02:00 committed by GitHub
parent 780fec8e36
commit 703e423e04
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ func (job endpointSyncJob) prepareSyncData(storedEndpoints, fileEndpoints []port
}
for idx, endpoint := range fileEndpoints {
if endpoint.Name == "" || endpoint.URL == "" {
if !isValidEndpoint(&endpoint) {
job.logger.Printf("Invalid file endpoint definition, skipping. [name: %v] [url: %v]", endpoint.Name, endpoint.URL)
continue
}