0xironclad / 0xironclad/Task-Scheduler-API

Implement DELETE /tasks/:id

Ouverte Adaptée aux débutants
#11 1 commentaire 0 réactions 1 personne assignée Réclamée par @0xironclad Voir sur GitHub
api good first issue
Langage dominant
TypeScript
Étoiles
0
Forks
2
Métriques de merge des PR
Aucune PR mergée en 30 j

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 💯

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
express, node.js, postgresql, typescript
Domaine
api, backend, database
Type d'issue
Fonctionnalité
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
65/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.