0xironclad / 0xironclad/Task-Scheduler-API

Implement DELETE /tasks/:id

Open Beginner friendly
#11 1 comment 0 reactions 1 assignee Claimed by @0xironclad View on GitHub
api good first issue
Dominant language
TypeScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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 💯

Contributor guide

No contributing guide indexed for this repository

Research direction

Look for the existing task routes (likely in a routes/ or controllers/ directory) to see the pattern for GET/POST endpoints. The database model for tasks (app.tasks) will be defined in a model or schema file. Add a DELETE route handler that validates the ID, performs the deletion, and returns the correct HTTP status codes (204 or 404). Test the endpoint with a tool like curl or Postman.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, node.js, postgresql, typescript
Domain
api, backend, database
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.