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

docs: add summary to group endpoints for openapi docs📝 #105

Conversation

shivamvijaywargi
Copy link
Contributor

No description provided.

@shivamvijaywargi shivamvijaywargi added the bug Something isn't working label Dec 15, 2024
@shivamvijaywargi shivamvijaywargi added this to the V1.0 milestone Dec 15, 2024
@shivamvijaywargi shivamvijaywargi self-assigned this Dec 15, 2024
@Copilot Copilot bot review requested due to automatic review settings December 15, 2024 10:30

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@github-actions github-actions bot added enhancement New feature or request release labels Dec 15, 2024

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/modules/group/group.handler.ts:342

  • [nitpick] The error message 'Some or all the Users you are trying to add already exists in group' is unclear. Consider rephrasing it to 'Some or all of the users you are trying to add already exist in the group'.
message: "Some or all the Users you are trying to add already exists in group",

src/modules/group/group.handler.ts:327

  • Ensure that the new behavior introduced by 'usersExistsInGroupRepository' is covered by tests.
const usersExistsInGroup = await usersExistsInGroupRepository(
@github-actions github-actions bot added the tests Test files, test configurations and testing utilities label Dec 15, 2024

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/modules/group/group.handler.ts:332

  • The condition should check if usersExistsInGroup is not empty to handle cases where the array is undefined or null. Use if (usersExistsInGroup && usersExistsInGroup.length) {.
if (usersExistsInGroup.length) {

src/modules/group/group.handler.ts:333

  • [nitpick] The variable existingUserIds should be renamed to existingUserIdsInGroup for better clarity and consistency with the function name.
const existingUserIds = usersExistsInGroup.map(user => user.userId);
Copy link
Contributor

@sub1120 sub1120 left a comment

Choose a reason for hiding this comment

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

@shivamvijaywargi @NiteshSoma after seeing this PR, i have one doubt - Do we have a route which will return users of a particular group, because in frontend users adding screen, we have to hide users which are already part of that group so this validatation will not fail. If possible we can return users details in GET /api/v1/group/:id​ itself.

@NiteshSoma
Copy link
Contributor

@shivamvijaywargi @NiteshSoma after seeing this PR, i have one doubt - Do we have a route which will return users of a particular group, because in frontend users adding screen, we have to hide users which are already part of that group so this validatation will not fail. If possible we can return users details in GET /api/v1/group/:id​ itself.

@sub1120 I am actually working on that issue where we get back user details in getGroupById

@sub1120
Copy link
Contributor

sub1120 commented Dec 15, 2024

@shivamvijaywargi @NiteshSoma after seeing this PR, i have one doubt - Do we have a route which will return users of a particular group, because in frontend users adding screen, we have to hide users which are already part of that group so this validatation will not fail. If possible we can return users details in GET /api/v1/group/:id​ itself.

@sub1120 I am actually working on that issue where we get back user details in getGroupById

Ooh nice.

@shivamvijaywargi @NiteshSoma after seeing this PR, i have one doubt - Do we have a route which will return users of a particular group, because in frontend users adding screen, we have to hide users which are already part of that group so this validatation will not fail. If possible we can return users details in GET /api/v1/group/:id​ itself.

@sub1120 I am actually working on that issue where we get back user details in getGroupById

Oh Nice! Then we are good.

Copy link
Contributor

@sub1120 sub1120 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@shivamvijaywargi shivamvijaywargi merged commit c3fe284 into main Dec 15, 2024
7 checks passed
@shivamvijaywargi shivamvijaywargi deleted the fix/101-bug-users-to-group-endpoint-does-not-return-current-added-user-details branch December 15, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request release tests Test files, test configurations and testing utilities
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[BUG]: Users to group endpoint does not return current added user details
3 participants