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 POST /roles Endpoint for adding a role #16

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

Implement POST /roles Endpoint for adding a role #16

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 the implementation of the POST /roles endpoint in the Laravel project. The purpose of this endpoint is to provide functionality for adding a new role to the system.

Tasks:

  • Create a new route for handling POST requests to /roles.
  • Implement a controller method to handle the creation of a new role.
  • Validate the incoming request data to ensure it meets the required criteria.
  • Implement the necessary logic to add a new role to the system.
  • Return an appropriate response indicating the success or failure of the operation.

Acceptance Criteria:

  • The endpoint /roles should be accessible via a POST request.
  • The request should include the necessary data for creating a new role.
  • If the request data is valid, a new role should be created and saved in the database.
  • The response should include the newly created role data along with a status indicating success.

Additional Information:

  • Ensure that proper error handling and validation are in place to handle any potential issues during role creation.
@Lapotor Lapotor added this to the v1.0.0 milestone Nov 1, 2023
whyauthentic pushed a commit that referenced this issue Dec 16, 2023
Add `RoleController` for listing, showing, creating, updating, and
deleting roles.
Assign the following permissions:

- `index()`: `show-roles`
- `store()`: `create-roles`
- `show()`: `show-roles`
- `update()`: `update-roles`
- `destroy()`: `delete-roles`

---

**Closes**:

- Close #15 
- Close #16 
- Close #17 
- Close #18 
- Close #19

---------

Signed-off-by: Valentin Sickert <17144397+Lapotor@users.noreply.github.com>
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