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 /shows Endpoint for Creating a New Show #3

Open
5 tasks
Lapotor opened this issue Nov 1, 2023 · 0 comments · May be fixed by #103
Open
5 tasks

Implement POST /shows Endpoint for Creating a New Show #3

Lapotor opened this issue Nov 1, 2023 · 0 comments · May be fixed by #103
Assignees
Milestone

Comments

@Lapotor
Copy link
Collaborator

Lapotor commented Nov 1, 2023

Description:

This task involves the development of the API endpoint POST /shows in the Laravel application. The purpose of this endpoint is to allow clients to create a new show entry in the system.

The endpoint should accept a JSON request body containing the necessary details for the new show, including attributes such as title, start_date, end_date, is_live, enabled, and moderators. The input data will be validated to ensure it meets the required format and constraints.

Additionally, authentication using Bearer token should be enforced for this endpoint to ensure that only authorized users can create new shows.

Once the data is validated and processed, the endpoint should return a JSON response containing the newly created show entry, along with a status code of 201 (CREATED).

Tasks:

  • Implement the controller method for handling the POST /shows request.
  • Create data validation rules to ensure the incoming data adheres to the required format.
  • Implement logic to persist the new show entry to the database.
  • Enforce authentication using a Bearer token for this endpoint.
  • Return the newly created show entry as a JSON response with a status code of 201 (CREATED).

Acceptance Criteria:

  • Sending a valid POST request to /shows with the required data should create a new show entry in the system and return it in the response.
  • Sending an invalid request (e.g., missing required fields or incorrect data format) should return an appropriate error response with the corresponding status code.
  • Unauthorized requests (without a valid Bearer token) should result in a 401 (Unauthorized) response.
@Lapotor Lapotor added this to the v1.0.0 milestone Nov 1, 2023
@Lapotor Lapotor linked a pull request Dec 29, 2023 that will close this issue
@Lapotor Lapotor self-assigned this Dec 29, 2023
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