Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(searchGroupUsers func): searchOptions is now an optional parameter #616

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

drewdaemon
Copy link
Contributor

ISSUES CLOSED: #615

): Promise<ISearchGroupUsersResult> {
const url = `${getPortalUrl(searchOptions)}/community/groups/${id}/userlist`;
const options = appendCustomParams<ISearchGroupUsersOptions>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current tests don't communicate it, but the point of calling appendCustomParams(options) was to allow this.

searchGroupUsers("5bc", {
  name: "jupe",
  sortField: "fullname",
  sortOrder: "asc",
  num: 2,
  start: 2,
  joined: [null, 123456],
  memberType: "member"
  authentication
})

(instead of requiring they be nested as a params object.)

Copy link
Member

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @drewctate!

Just need to bring back appendCustomParams() and this should be GTG.

httpMethod: "GET"
}
);
const options: IRequestOptions = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need to use appendCustomParams() b/c the searchOptions needs to go into options.params right? Also we want to the only the white-listed searchOptions properties.

expect(options.method).toBe("GET");
done();
searchGroupUsers("5bc", {
params: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, now I see why this works w/o appendCustomParams() - these props should not be nested under params when passed in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯

@drewdaemon drewdaemon force-pushed the b/group-userlist-optional-search-opts branch from bbfdd9c to b445c62 Compare September 3, 2019 17:58
@drewdaemon drewdaemon force-pushed the b/group-userlist-optional-search-opts branch from b445c62 to d54bddb Compare September 3, 2019 17:59
@codecov
Copy link

codecov bot commented Sep 3, 2019

Codecov Report

Merging #616 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #616   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          99     99           
  Lines        1483   1484    +1     
  Branches      256    257    +1     
=====================================
+ Hits         1483   1484    +1
Impacted Files Coverage Δ
packages/arcgis-rest-portal/src/groups/get.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d49159f...d54bddb. Read the comment docs.

@drewdaemon drewdaemon merged commit ac0913b into master Sep 3, 2019
@tomwayson tomwayson deleted the b/group-userlist-optional-search-opts branch September 3, 2019 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

searchGroupUsers: Search Options Should Be Optional
3 participants