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

[feature]: Add/Modify endpoints to allow query of disabled records #511

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

dave-ok
Copy link
Member

@dave-ok dave-ok commented Jul 28, 2020

Before submitting your PR for review

  • Run npm run lint to find errors in code syntax/format
  • Run npm run lint:fix to fix all auto-fixable errors in source code and auto-format with prettier
  • Ensure you fix any linting errors displayed after running any of the above commands

What does this PR do?

Fixes #510

Add new/Modify existing endpoints to allow queries to include disabled records

description of Task to be completed?

  • Create pagination utility for querying soft-deleted records along with undeleted records
  • Write tests for new pagination utility
  • Apply new pagination utility to getAllMsAdmins, getAllOrganizations, getAllApplications endpoints with option to filter records by isDisabled/isBlocked states
  • Include isDisabled/isBlocked fields in all queried records
  • Modify all relevant tests

How should this be manually tested?
With a valid MsAdmin token make any/all of the following requests

  • GET /msAdmins?filter=disabled - to get only disabled records
  • GET /msAdmins?filter=all - to get both disabled and non-disabled records
  • GET /msAdmins - to get only non-disabled records

Any background context you want to provide?

The pagination package currently in use (mongoose-paginate-v2) does not support querying soft-deleted records

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.

[FEATURE REQUEST] - Get all disabled/enabled records from queries
1 participant