Skip to content

Commit

Permalink
fix(API): rename parameter and function name
Browse files Browse the repository at this point in the history
  • Loading branch information
iljassh committed Apr 12, 2021
1 parent 567163c commit ccb5712
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/rolestore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func New(api restapi.Connector) *RoleStore {
return &RoleStore{api: api}
}

// UserAndUserSettings returns current user and user's settings
func (store *RoleStore) UserAndUserSettings() ([]User, error) {
// CurrentUser returns current user and user's settings
func (store *RoleStore) CurrentUser() ([]User, error) {
result := usersResult{}
_, err := store.api.
URL("/role-store/api/v1/users/current").
Expand All @@ -64,13 +64,13 @@ func (store *RoleStore) UserAndUserSettings() ([]User, error) {
}

// SearchUsersExternal searche users with user search parameters.
func (store *RoleStore) SearchUsersExternal(keywords, source string) ([]User, error) {
func (store *RoleStore) SearchUsersExternal(keywords, sourceID string) ([]User, error) {
result := usersResult{}
_, err := store.api.
URL("/role-store/api/v1/users/search/external").
Post(map[string]string{
"keywords": keywords,
"source": source,
"source": sourceID,
}, &result)

return result.Items, err
Expand Down

0 comments on commit ccb5712

Please sign in to comment.