Skip to content

Implement DELETE /tasks/:id #11

@0xironclad

Description

@0xironclad

Implement an endpoint that removes a task by ID.

What to implement

- Route: DELETE /tasks/:id

- Validate that id is a valid number.

- Delete the task from app.tasks table.

- Return 204 No Content on success.

- Return 404 if the task does not exist.

Expected result
The task is removed from the database, and any related task_logs (via ON DELETE CASCADE) are cleaned up automatically.
You actually do not need any extra logic for the task logs part, postgresql will handle that part 💯

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions