Skip to content

Commit

Permalink
handle single org usecase
Browse files Browse the repository at this point in the history
  • Loading branch information
AdheipSingh committed Sep 18, 2024
1 parent c700fb8 commit 90591d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hossted/service/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,14 @@ func OrgUseCases(orgs []org) (orgID string, err error) {

}

return "", nil
if orgs != nil && len(orgs) == 1 {
orgName, err := base64.StdEncoding.DecodeString(orgs[0].Name)
if err != nil {
return "", err
}
fmt.Printf("OrgName: %s\n", orgName)
return orgs[0].ID, nil
}
}

func removePrefix(text string) (string, error) {
Expand Down

0 comments on commit 90591d1

Please sign in to comment.