Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit e1de595

Browse files
authored
Merge pull request #14 from LF-Engineering/affiliations
url escape affs api path params
2 parents c63ca56 + 96d6179 commit e1de595

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

affiliation/identity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (a *Affiliation) AddIdentity(identity *Identity) bool {
8484
queryParams["email"] = identity.Email
8585
queryParams["uuid"] = identity.UUID
8686

87-
endpoint := a.AffBaseURL + "/Affiliation/" + a.ProjectSlug + "/add_identity/" + url.PathEscape(identity.Source)
87+
endpoint := a.AffBaseURL + "/affiliation/" + url.PathEscape(a.ProjectSlug)+ "/add_identity/" + url.PathEscape(identity.Source)
8888
_, res, err := a.httpClient.Request(strings.TrimSpace(endpoint), "POST", headers, nil, queryParams)
8989
if err != nil {
9090
log.Println("Repository: AddIdentity: Could not insert the identity: ", err)

auth0/token.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"errors"
66
"fmt"
77
"log"
8-
"os"
98
"strconv"
109
"strings"
1110
"time"
@@ -18,7 +17,6 @@ import (
1817

1918
// ClientProvider ...
2019
type ClientProvider struct {
21-
Auth0BaseURL string
2220
ESCacheURL string
2321
ESCacheUsername string
2422
ESCachePassword string
@@ -81,7 +79,7 @@ func (a *ClientProvider) GenerateToken() string {
8179
log.Println("GenerateToken", err)
8280
}
8381

84-
log.Println(os.Getenv("AUTH_URL"), " ", string(body))
82+
log.Println(a.AuthURL, " ", string(body))
8583
err = json.Unmarshal(response, &result)
8684
if err != nil {
8785
log.Println("GenerateToken", err)

0 commit comments

Comments
 (0)