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

Implement "Delete User Account" in UserController #36

Open
5 tasks
AhmedFatthy1040 opened this issue Oct 8, 2024 · 1 comment · May be fixed by #47
Open
5 tasks

Implement "Delete User Account" in UserController #36

AhmedFatthy1040 opened this issue Oct 8, 2024 · 1 comment · May be fixed by #47
Assignees
Labels

Comments

@AhmedFatthy1040
Copy link
Collaborator

Issue Title: Implement "Delete User Account" in UserController

Issue Description:

As an admin, I want to be able to permanently delete a user account from the platform so that I can manage users effectively and remove any accounts that violate our policies.

Tasks:

  1. Create an endpoint in the UserController that allows the admin to delete a user account by their user ID.
  2. Ensure that when a user account is deleted, all associated data (e.g., user profile, jobs posted, reviews) is also removed from the database.
  3. Implement security measures to ensure only admin users can access this endpoint.

Acceptance Criteria:

  • Admin should be able to make a DELETE request to /api/users/{userId} to delete a user account.
  • Return 204 No Content if the deletion is successful.
  • Return 404 Not Found if the user does not exist.
  • Ensure proper error handling and validation.
  • Apply proper authorization so that only users with the "admin" role can access this endpoint.
@Seifeldahshan
Copy link

ill take this task

Seifeldahshan added a commit to Seifeldahshan/upwork-clone-backend that referenced this issue Oct 15, 2024
delete user account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants