[JITERA] feat: Add API endpoint for creating To-Do items
Created by: chi-jitera
Overview
This pull request introduces a new API endpoint for creating To-Do items in the application. The endpoint allows users to add new tasks with a title, optional description, due date, and completion status.
Changes
- Created a new route: A new route has been added to handle POST requests for creating To-Do items.
- Controller function: Implemented a controller function that processes the incoming request, validates the data, and saves the new To-Do item to the database.
- Error handling: Added error handling to manage potential issues during the creation process, such as missing required fields or database errors.
- Response structure: Defined a consistent response structure for successful and failed requests.
This enhancement will allow users to manage their tasks more effectively by adding new To-Do items through the API.