create todo list

This commit is contained in:
Primakov Alexandr Alexandrovich
2025-01-18 16:50:58 +03:00
parent d88e680413
commit fb644b6f7b
8 changed files with 102 additions and 69 deletions

View File

@@ -27,7 +27,7 @@ router.put('/new', (req, res) => {
return res.status(500).send('No data to update'); // Internal server error
}
indexedUpdatedData = { id: data.length, ...updatedData }; // Add the new dictionary to the array
const indexedUpdatedData = { id: data.length, ...updatedData }; // Add the new dictionary to the array
data.push(indexedUpdatedData); // Add the new dictionary to the array