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 /users/{id} Endpoint for deleting a user by ID. #14

Closed
6 tasks done
Lapotor opened this issue Nov 1, 2023 · 0 comments · Fixed by #73
Closed
6 tasks done

Implement DELETE /users/{id} Endpoint for deleting a user by ID. #14

Lapotor opened this issue Nov 1, 2023 · 0 comments · Fixed by #73
Assignees
Milestone

Comments

@Lapotor
Copy link
Collaborator

Lapotor commented Nov 1, 2023

Description:

This task involves implementing the functionality to delete a user by their unique ID. The API endpoint to be developed is DELETE /users/{id}. This endpoint should accept a valid user ID in the URL parameter and remove the corresponding user from the system.

Tasks:

  • Create the route definition for the DELETE /users/{id} endpoint.
  • Implement the controller method responsible for handling the deletion process.
  • Integrate necessary validation to ensure that the provided user ID is valid.
  • Implement the logic to delete the user record from the database.
  • Return an appropriate response indicating the success or failure of the operation.
  • Handle any potential error scenarios, such as invalid user IDs or database errors, and return the appropriate HTTP status codes.

Acceptance Criteria:

  • The DELETE /users/{id} endpoint successfully removes the user with the specified ID.
  • An appropriate response is returned to indicate the outcome of the operation (e.g., HTTP status code 204 for success).
  • Proper validation is in place to handle cases where the provided user ID is invalid or does not exist.
  • Error handling is implemented to address potential issues during the deletion process.

Additional Information:

  • Ensure that this endpoint is secured with proper authentication mechanisms.
  • Consider writing unit tests to verify the functionality of the DELETE /users/{id} endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant