-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Implement the Label feature API for the Task Manager App. This feature allows users to categorize their tasks using labels, making it easier to organize and filter tasks.
Features to Implement
- Create Label –
POST /labels– Create a new label with a name and color - Get All Labels –
GET /labels– Retrieve all available labels - Get Label by ID –
GET /labels/:id– Retrieve a specific label - Update Label –
PUT /labels/:id– Update a label's name or color - Delete Label –
DELETE /labels/:id– Delete a label - Assign Label to Task –
POST /tasks/:id/labels– Assign one or more labels to a task - Remove Label from Task –
DELETE /tasks/:id/labels/:labelId– Remove a label from a task - Filter Tasks by Label –
GET /tasks?label=:labelName– Filter tasks based on their assigned label
Acceptance Criteria
- Labels can be created, read, updated, and deleted (CRUD)
- Labels can be assigned to and removed from tasks
- Tasks can be filtered by label
- All endpoints return appropriate HTTP status codes and JSON responses
- Input validation is in place for label creation/update
- Unit/integration tests cover the new endpoints
Technical Notes
- Add a
labelstable/collection in the database - Add a
task_labelsjoin table for the many-to-many relationship between tasks and labels - Update
database.jswith the new schema - Add label routes in
index.js - Update frontend (
public/script.js,views/index.ejs) to support label assignment and filtering
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels