[FEAT] Implement an endpoint to export all users in an CSV file(only for super admin role) #448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement a new API endpoint that allows exporting the list of all users in a CSV file format. This functionality should be accessible only to users with the Super Admin role. The exported CSV should include the necessary user details (e.g., user ID, Fullname, email).
Closes #427
Changes proposed
What were you told to do?
[FEAT] Implement an endpoint to export all users in an CSV file(only for super admin role)
What did you do?
i created a new endpoint in the Usercontroller named ExportUsersToCsv , created a class named ExportUsersToCsvQueryHandler in the handlers folder , created another class named ExportUsersToCsvQuery in Query folder , finally i wrote a unit test code for my ExportUsersToCsvQueryHandler class . the unit test class is named ExportUsersToCsvQueryHandlerShould
Check List (Check all the applicable boxes)
🚨Please review the contribution guideline for this repository.
-[done ] My code follows the code style of this project.
-[ done] This PR does not contain plagiarized content.
-[done ] The title and description of the PR is clear and explains the approach.
-[ not done] I am making a pull request against the dev branch (left side).
-[ done] My commit messages styles matches our requested structure.
-[ done] My code additions will fail neither code linting checks nor unit test.
-[done ] I am only making changes to files I was requested to.
Screenshots/Videos