Skip to content

Update user role endpoint path and add isSuperAdmin to user object #19

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

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

foyzulkarim
Copy link
Owner

@foyzulkarim foyzulkarim commented Dec 20, 2024

Changes

This PR includes two main updates:

  1. API Endpoint Restructuring

    • Modified the user role update endpoint from /:id/update-role to /update-role/:id
    • This change follows REST API best practices for consistent endpoint structure
  2. User Object Enhancement

    • Added isSuperAdmin field to the trimmed user object in createTrimmedUser function
    • This addition ensures super admin status is properly reflected in user data responses

Impact

  • API consumers will need to update their endpoint calls for user role updates
  • User objects returned by the API will now include the isSuperAdmin property

Related Issues

foyzulkarim/commitstreams-client#31

…route

- Added isSuperAdmin field to the user object in the server.js file to support enhanced role management.
- Updated the user role update API route to a more RESTful format by changing the endpoint from '/:id/update-role' to '/update-role/:id' for better clarity and consistency.
Copy link

@foyzulkarim foyzulkarim changed the title feat: enhance user management with isSuperAdmin field and update API … Update user role endpoint path and add isSuperAdmin to user object Dec 20, 2024
@foyzulkarim foyzulkarim marked this pull request as ready for review December 20, 2024 11:51
@foyzulkarim foyzulkarim merged commit bb3ad50 into main Dec 20, 2024
3 checks passed
@foyzulkarim foyzulkarim deleted the feature/apply-role-based-access-control branch December 20, 2024 11:52
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.

1 participant