0xironclad / 0xironclad/Task-Scheduler-API
Implement DELETE /tasks/:id
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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 💯
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- express, node.js, postgresql, typescript
- Ambito
- api, backend, database
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 65/100