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 PUT /roles/{id} Endpoint for updating a role #18

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

Implement PUT /roles/{id} Endpoint for updating a role #18

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 adding functionality to update an existing role in the Laravel project. The PUT /roles/{id} endpoint allows clients to send updated information for a specific role identified by its id.

Tasks:

  • Create a route in the Laravel routes file for handling the PUT /roles/{id} request.
  • Implement a controller method responsible for processing the update request.
  • Validate the incoming data to ensure it meets the required criteria.
  • Update the role record in the database based on the provided id.
  • Return the updated role data in the response.

Acceptance Criteria:

  • The endpoint should be accessible and functional in the Laravel project.
  • A valid id parameter should be required in the request URL.
  • The request body should contain valid data for updating the role.
  • The role record in the database should be successfully updated.
  • The response should include the updated role information.

Additional Information:

  • Ensure proper error handling and response in case of invalid input or server errors.
  • Consider implementing appropriate authorization checks to ensure only authorized users can perform this action.
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