diff --git a/api/rpcsvc/svc.go b/api/rpcsvc/svc.go index b98cdea65c298a3c12311254091e63f6f684786d..28eabcea20ced9733bd4c134cad52cc06ec4d4af 100644 --- a/api/rpcsvc/svc.go +++ b/api/rpcsvc/svc.go @@ -17,8 +17,6 @@ import ( "gitlab.qarea.org/tgms/redminems/cfg" "gitlab.qarea.org/tgms/redminems/entities" "gitlab.qarea.org/tgms/redminems/entities/feature" - - ) var log = narada.NewLog("rpcsvc: ") @@ -241,7 +239,7 @@ func (r *API) GetAuthMethods(req *AuthMethodsReq, resp *AuthMethodsResp) error { var err error resp.Methods, err = r.tracker.AuthMethods(ctx, req.Tracker) if err != nil { - return err + return err } resp.RequiredIntegration, err = r.tracker.RequiredIntegration(ctx, req.Tracker) return err @@ -276,6 +274,8 @@ func (r *API) ValidateTracker(req *ValidateTrackerReq, res *ValidateTrackerResp) url := reducePath(u.Path, func(path string) (url string, err error) { trk.URL = u.Scheme + "://" + u.Host + path newURL, err := r.tracker.TestRequest(ctx, trk) + log.DEBUG("newUrl after TestRequest: %s", newURL) + log.DEBUG("err after TestRequest: %s", err) if err == nil { // custom conditions may apply here // Use passed URL as valid if empty or URL returned if newURL != "" { @@ -286,6 +286,7 @@ func (r *API) ValidateTracker(req *ValidateTrackerReq, res *ValidateTrackerResp) } return }) + log.DEBUG("url after reducePath: %s", url) if url != "" { res.URL = url @@ -351,4 +352,4 @@ func reducePath(path string, f func(string) (string, error)) (url string) { } return -} \ No newline at end of file +}