Skip to content

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