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 /roles/{id} Endpoint for deleting a role #19

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

Implement DELETE /roles/{id} Endpoint for deleting a role #19

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

Comments

@Lapotor
Copy link
Collaborator

Lapotor commented Nov 1, 2023

Description:

This task involves implementing the DELETE endpoint for removing a role in the Laravel project. The endpoint is responsible for deleting a specific role identified by its unique ID ({id}). This functionality is crucial for managing roles within the system.

Tasks:

  • Create a route definition for the DELETE /roles/{id} endpoint in the routes file.
  • Implement the corresponding controller method for handling role deletion.
  • Validate the request parameters to ensure the provided role ID is valid.
  • Add logic to delete the role from the database.
  • Provide appropriate response handling for success and error scenarios.

Acceptance Criteria:

  • The endpoint should return a 204 No Content status code upon successful role deletion.
  • Proper error responses should be provided for cases where the provided role ID is invalid or the deletion process encounters an error.

Additional Information:

  • Ensure proper error handling in case of invalid requests or database failures.
  • Verify the correctness of the implementation by thorough testing, covering both success and failure cases.
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