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

Fix for1973 1966 1963 #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/controllers/v1/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,14 +762,8 @@ module.exports = class Entities extends Abstract {
let pointerToEntitiesArray = 0;
pointerToEntitiesArray < entityDocuments.result.data.length;
pointerToEntitiesArray++
) {
if (entityDocuments.result.data[pointerToEntitiesArray].entityType == 'school') {
entityDocuments.result.data[pointerToEntitiesArray].label +=
' - ' + entityDocuments.result.data[pointerToEntitiesArray].externalId
}
}
) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@MallanagoudaB can you explain the use of if condition and for loop here

}

return resolve(entityDocuments)
} catch (error) {
return reject({
Expand Down
2 changes: 1 addition & 1 deletion src/generics/constants/api-responses.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ module.exports = {
USER_ROLE_INFORMATION_CREATED: 'USER_ROLE_INFORMATION_CREATED',
USER_ROLE_UPDATATED: 'USER_ROLE_UPDATATED',
USER_ROLE_DELETED: 'USER_ROLE_DELETED',
ENTITY_UPDATATED:'ENTITY_UPDATATED'
ENTITY_UPDATED: 'ENTITY_UPDATED',
}
2 changes: 1 addition & 1 deletion src/module/entities/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ module.exports = class UserProjectsHelper {
}
resolve({
success: true,
message: CONSTANTS.apiResponses.ENTITY_UPDATATED,
message: CONSTANTS.apiResponses.ENTITY_UPDATED,
result: entityInformation,
})
// resolve({ entityInformation, message: CONSTANTS.apiResponses.ENTITYTYPE_UPDATED })
Expand Down
14 changes: 13 additions & 1 deletion src/module/userRoleExtension/validator/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@
module.exports = (req) => {
let userRoleValidator = {
create: function () {
req.checkBody('title').exists().withMessage('required title ')
// req.checkBody('title').exists().withMessage('required title ')
Copy link
Collaborator

Choose a reason for hiding this comment

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

@MallanagoudaB why are we keeping this commented part?

req.checkBody('entityTypes[0].entityType').exists().withMessage('entityType name ')
req.checkBody('entityTypes[0].entityTypeId').exists().withMessage('entityTypeId name ')
req.checkBody('title')
.exists()
.withMessage('The title field is required.')
.trim() // Removes leading and trailing spaces
.notEmpty()
.withMessage('The title field cannot be empty.')
req.checkBody('userRoleId')
.exists()
.withMessage('The userRoleId field is required.')
.trim() // Removes leading and trailing spaces
.notEmpty()
.withMessage('The userRoleId field cannot be empty.')
},
update: function () {
req.checkBody('title').exists().withMessage('required title')
Expand Down