You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
, andmoderators
. 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:
POST /shows
request.Acceptance Criteria:
POST
request to/shows
with the required data should create a new show entry in the system and return it in the response.The text was updated successfully, but these errors were encountered: