create todo list
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user