diff --git a/core/service.go b/core/service.go index be9ed06..5e32a08 100644 --- a/core/service.go +++ b/core/service.go @@ -186,7 +186,7 @@ func (sh *serviceDescription) readProfile(authtype string, id string, binfo stri if err != nil { return "", err } - if userinfo.token == "" { + if len(userinfo.token) == 0 { return "", errors.New("refreshtoken token not found") } @@ -256,7 +256,7 @@ func (sh *serviceDescription) prepare(mg *Maingate) error { if len(sh.VersionSplits) == 0 { sh.VersionSplits = map[string]string{ - "": strings.Join(namesOnly, ","), + "default": strings.Join(namesOnly, ","), } } @@ -758,7 +758,7 @@ func (sh *serviceDescription) findVersionSplit(version string) []byte { } } } - return sh.divisionsSplits[""] + return sh.divisionsSplits["default"] } func (sh *serviceDescription) serveHTTP(w http.ResponseWriter, r *http.Request) {