-
Notifications
You must be signed in to change notification settings - Fork 59
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
[Feat]- Get and organizations owned and belonged to by the user for admin #428
base: dev
Are you sure you want to change the base?
Conversation
…ed organizations - Added endpoint to get organizations owned by a user - Added endpoint to get organizations a user belongs to - Implemented query handlers for fetching organizations based on user ID - Integrated MediatR for handling queries efficiently - Improved response structure for paginated organization data
…ons a user belongs to query handlers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove the unused service in GetUsersMemberOrganizationsByUserIdQueryHandler.cs
, other than that the PR seems fine to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field 'GetUsersMemberOrganizationsByUserIdQueryHandler._authenticationService' is never used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user is not found, you can return an empty list instead of the null.
Also, a PR title needs to be short and descriptive, ex "Feat: get an organization and its owner by an admin". |
Also, there are some misspelt words in your PR, you can also edit and correct them. |
i have edited it, also fixed the typos |
Remove the issue and the number from the title. It's enough that you mention it in your PR (it will get linked to the issue automatically). You're title should be something like "Feat: user-owned organizations and their members for admin" |
i Have added appropriate authorization policy to make sure the user is an admin |
Description
Issue was to add features where admin can get organizations a user belongs to or owns by their user id
**Closes #418 *
What were you told to do?
implement two endpoints for admin to get users organization owned by a user and organization a user belongs to using the user's id
Implementaion of endpoints for admin to get user organiztion details
No additional dependencies was installed, i changed only the admin controller file, the rest files where created to implment the enpont
Check List
Screenshots/Videos
screenshot of implemented endpoints

Proper error on wrong user id

screenshot of returning owend organizatons
