0xironclad / 0xironclad/Task-Scheduler-API

Implement DELETE /tasks/:id

Đang mở Phù hợp với người mới
#11 1 bình luận 0 reaction 1 người được giao Được @0xironclad nhận Xem trên GitHub
api good first issue
Ngôn ngữ chính
TypeScript
Star
0
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 💯

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
express, node.js, postgresql, typescript
Lĩnh vực
api, backend, database
Loại issue
Tính năng
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
65/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.