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

scp-story#1359 - Enhancing entity management #77

Closed

Conversation

adithyadinesh0412
Copy link
Collaborator

@adithyadinesh0412 adithyadinesh0412 commented Dec 12, 2024

Changes done -
Added pagination to APIs :

entity-management/v1/entities/entityListBasedOnEntityType?entityType=state
entity-management/v1/entities/targetedRoles/:_id

Updated subEntitiesList API to share the parent entities as well in the response.

Copy link
Collaborator

@VISHNUDAS-tunerlabs VISHNUDAS-tunerlabs left a comment

Choose a reason for hiding this comment

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

Reviewed on Dec 13 : 15:46 : 2024

src/databaseQueries/userRoleExtension.js Outdated Show resolved Hide resolved
src/module/entities/helper.js Outdated Show resolved Hide resolved
src/module/entities/helper.js Outdated Show resolved Hide resolved
src/module/userRoleExtension/helper.js Outdated Show resolved Hide resolved
src/module/userRoleExtension/helper.js Outdated Show resolved Hide resolved
@@ -185,9 +211,11 @@ module.exports = class UserProjectsHelper {
/**
* Fetches targeted roles based on the provided entity IDs.
* @param {Array<string>} entityId - An array of entity IDs to filter roles.
* @param {params} pageSize - page pageSize.
* @param {params} pageNo - page no.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@adithyadinesh0412 Please ad explanation for paginate param as well

@@ -927,10 +958,12 @@ module.exports = class UserProjectsHelper {
* @method
* @name entityListBasedOnEntityType
* @param {string} type - Type of entity to fetch documents for.
* @param {string} pageNo - pageNo for pagination
* @param {string} pageSize - pageSize for pagination
Copy link
Collaborator

Choose a reason for hiding this comment

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

@adithyadinesh0412 update function signature

@@ -87,13 +87,23 @@ module.exports = class userRoleExtensionHelper {
* Find user role extensions based on the provided query and projection.
* @param {Object} bodyQuery - The query to filter user role extensions.
* @param {Array<String>} projection - The fields to include in the returned documents.
* @param {string} limit - limit for pagination
* @param {string} offset - offset for pagination
Copy link
Collaborator

Choose a reason for hiding this comment

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

@adithyadinesh0412 check and verify all the function signatures once

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