Skip to content

Commit

Permalink
Merge pull request #23 from nordeck/nic/feat/fix_optional_param
Browse files Browse the repository at this point in the history
fix opt param
  • Loading branch information
owanckel authored Jan 23, 2023
2 parents 1580dcf + fdfb13a commit 15d16b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion backend/internal/client/rest_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
func Post(config *internal.Configuration, reqBody []byte) (io.ReadCloser, error) {
client := &http.Client{}
req, err := http.NewRequest("POST", config.OidcValidationUrl, bytes.NewBuffer(reqBody))
req.Header.Add("Authorization", "Bearer "+config.UvsAuthToken)
req.Header.Add("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions backend/internal/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type Configuration struct {
OidcValidationUrl string `json:"oidc_validation_url,'https://some.url/verify/user'"` // OIDC_VALIDATION_URL
JwtSecret string `json:"jwt_secret,someArbitraryString"` // JWT_SECRET
MatrixServerName string `json:"matrix_server_name,'domain.tld'"` // MATRIX_SERVER_NAME
UvsAuthToken string `json:"uvs_auth_token,someArbitraryString"` // UVS_AUTH_TOKEN
}

func ConfigurationFromEnv() *Configuration {
Expand All @@ -47,7 +46,6 @@ func ConfigurationFromEnv() *Configuration {
os.Getenv("OIDC_VALIDATION_URL"),
os.Getenv("JWT_SECRET"),
os.Getenv("MATRIX_SERVER_NAME"),
os.Getenv("UVS_AUTH_TOKEN"),
}

elements := reflect.ValueOf(&config).Elem()
Expand Down

0 comments on commit 15d16b1

Please sign in to comment.