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

[IMPROVE] teams.list endpoint doesn't support queries #21259

Merged
merged 5 commits into from
Mar 23, 2021

Conversation

matheusbsilva137
Copy link
Member

Proposed changes (including videos or screenshots)

  • Add support for queries (within the query parameter);
  • Add support for sorts (within the sort parameter);
  • Add support for field selections (projections, within the fields parameter);

Issue(s)

Task - ClickUp

Steps to test or reproduce

Example inputs (using cURL):

  1. Query:
curl -G 'http://localhost:3000/api/v1/teams.list' \
  --data-urlencode 'query={"createdAt":{"$gt":{"$date":"2021-03-12T20:15:49.348Z"}}}' \
  -H 'X-Auth-Token: c3rQDH_Fpa7JHSgUrWvlpxwIi1AAu4qTnfAF4SFgWkB' \
  -H 'X-User-Id: dizcH9Edm8hC7ziDX' \
  -H 'Content-Type: application/json'
  1. Sort: --data-urlencode 'sort={"createdAt":1}'
  2. Field Selections (projections): --data-urlencode 'fields={"_id":1, "name":1}'

Further comments

@pierre-lehnen-rc pierre-lehnen-rc changed the title [IMPROVE] teams.list endpoint doesn't support queries, sorts and field selections [IMPROVE] teams.list endpoint doesn't support queries Mar 23, 2021
@pierre-lehnen-rc pierre-lehnen-rc merged commit a8b90a9 into new/teams-back Mar 23, 2021
@pierre-lehnen-rc pierre-lehnen-rc deleted the new/teams-back-list-queries branch March 23, 2021 13:54
gabriellsh added a commit that referenced this pull request Mar 23, 2021
…w/channel-to-team

* 'new/teams' of github.com:RocketChat/Rocket.Chat:
  Fix lint
  fix seeing parent team on teamMain
  [FIX] room autocomplete also listing teams.
  Set teamMain on old room when converting it to a team (#21277)
  [FIX] typescript error (#21276)
  [IMPROVE] teams.members endpoint doesn't support queries (#21273)
  Teams Header (#21214)
  Teams Directory Tab (#21194)
  add checkbox (#21209)
  New/teams (#21269)
  [IMPROVE] teams.list endpoint doesn't support queries (#21259)
  New/teams add teammembers to channels (#21252)
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.

2 participants