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

Create profile search #28

Closed
ayush-goyal opened this issue Mar 4, 2022 · 0 comments · Fixed by #32
Closed

Create profile search #28

ayush-goyal opened this issue Mar 4, 2022 · 0 comments · Fixed by #32
Assignees

Comments

@ayush-goyal
Copy link
Member

On this profiles GET route, add multiple search params to be able to search for users. You should be able to search by user's names (first, middle, last) and phone number. You should also include pagination.

Here are the query params to include

  • search, this should be a text field with search stuff
  • limit shows how many valid objects to return
  • offset shows how much to offset by in pagination
  • regex = true if its enabled, decides whether the search term uses regex or not

Your return should include these fields

  • offset shows the current offset
  • total total number of objects that match
  • count number of objects returned in this query
  • profiles actual profile objects of users

You should be able to use mongoose tools to skip, search, and query by regex. You can look here and here for some inspiration and ideas.

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 a pull request may close this issue.

2 participants