From a76df305e630e3b037867a05c60a0fb4f0914b3e Mon Sep 17 00:00:00 2001
From: abouchtita <abouchtita@devops-tp.local>
Date: Fri, 14 Mar 2025 17:36:39 +0100
Subject: [PATCH] Ajout de l'endpoint POST /api/tasks et de la fonction addTask

---
 src/taskService.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/taskService.js b/src/taskService.js
index d9eaefc..1ec2dd4 100644
--- a/src/taskService.js
+++ b/src/taskService.js
@@ -16,7 +16,7 @@ function getAllTasks() {
 
 function addTask(description) {
     if (!description) {
-        throw new Error("La description est requise");
+        throw new Error('La description est requise');
     }
     const newId = tasks.reduce((max, task) => task.id > max ? task.id : max, 0) + 1;
     const newTask = {
-- 
GitLab