Skip to content

Commit

Permalink
check for connection in map
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Barr committed Sep 1, 2020
1 parent 533f7ac commit f0e823e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,12 @@ func (store *CredentialStore) GetClientWithSecret(allClients map[string]OidcClie

func (store *CredentialStore) GetClientWithoutSecret(allClients map[string]OidcClient, name string) (OidcClient, error) {
var client OidcClient
client = allClients[name]
return client, nil

if client, ok := allClients[name]; ok {
return client, nil
}

return client, errors.New("connection not found")
}

func (store *CredentialStore) ClientExists(name string) (bool, error) {
Expand Down

0 comments on commit f0e823e

Please sign in to comment.