Skip to content

Commit

Permalink
adjust usage of DBS_URL as base url
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Apr 7, 2021
1 parent 21731d5 commit 2b473a3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions services/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ func DBSUrl(inst string) string {
if burl == "" { // case of dasgoclient
burl = "https://cmsweb.cern.ch:8443"
}
surl := fmt.Sprintf("%s/dbs/%s/DBSReader", burl, inst)
if v != "" {
surl = v
if strings.Contains(v, "DBSReader") {
return v
}
burl = v
}
surl := fmt.Sprintf("%s/dbs/%s/DBSReader", burl, inst)
return surl
}
func PhedexUrl() string {
Expand All @@ -38,10 +41,10 @@ func PhedexUrl() string {
if burl == "" { // case of dasgoclient
burl = "https://cmsweb.cern.ch:8443"
}
surl := fmt.Sprintf("%s/phedex/datasvc/json/prod", burl)
if v != "" {
surl = v
burl = v
}
surl := fmt.Sprintf("%s/phedex/datasvc/json/prod", burl)
return surl
}
func SitedbUrl() string {
Expand Down

0 comments on commit 2b473a3

Please sign in to comment.