- Added Features:
- Used JWT Authentication.
- Used Bcrypt package to hash and store the password.
-
- Creating a todo for logged in user.
- Fetching all the ToDo's of the particular logged in user.
- Editing a particular todo by providing the appropriate ID.
- Deleting a single or all the ToDO's of the logged In User.
- Provided the PostMan collection.
-
- { "username" : "John Doe", "password": "johndoe", "email" : "[email protected]" }
- { "username": "John Doe", "email": "[email protected]" }
-
- { "password": "johndoe", "email" : "[email protected]" }
- { "userId": "6596c1579c807fe0b9fb0a83", "username": "John Doe", "email": "[email protected]", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTZjMTU3OWM4MDdmZTBiOWZiMGE4MyIsImlhdCI6MTcwNDM3ODgyMiwiZXhwIjoxNzA0NDY1MjIyfQ.Lw432FlY1dJ5EfxyiFxrpeJ-qVIEnsuY_zfJfP_MA0E" }
-
- { "userId" : "6596c1579c807fe0b9fb0a83", "todo" : "Bake the cake.", "status" : "Pending" }
- { "message": "ToDo created succesfully", "todo": { "todo": "Bake the cake.", "createdUser": "6596c1579c807fe0b9fb0a83", "createdUserName": "John Doe", "status": "Pending", "\_id": "6596c2549c807fe0b9fb0a88", "createdAt": "2024-01-04T14:36:04.093Z", "updatedAt": "2024-01-04T14:36:04.093Z", "\_\_v": 0 } }
-
- { "updatedToDo" : "Bought The cake flour", "status" : "done" }
-
- { "_id": { "$oid": "6596c2de9c807fe0b9fb0a8c" }, "todo": "Restocking the cake flour", "createdUser": { "$oid": "6596c1579c807fe0b9fb0a83" }, "createdUserName": "John Doe", "status": "Pending", "createdAt": { "$date": "2024-01-04T14:38:22.693Z" }, "updatedAt": { "$date": "2024-01-04T14:38:22.693Z" }, "__v": 0 }
- { "message": "ToDo Updated!" }
-
- { "_id": { "$oid": "6596c2de9c807fe0b9fb0a8c" }, "todo": "Bought The cake flour", "createdUser": { "$oid": "6596c1579c807fe0b9fb0a83" }, "createdUserName": "John Doe", "status": "done", "createdAt": { "$date": "2024-01-04T14:38:22.693Z" }, "updatedAt": { "$date": "2024-01-04T14:43:16.636Z" }, "__v": 0 }
-
-
- { "userId" : "6596c1579c807fe0b9fb0a83", }
- { "message": "All your ToDo's", "todos": [ { "_id": "6596c2549c807fe0b9fb0a88", "todo": "Bake the cake." }, { "_id": "6596c2de9c807fe0b9fb0a8c", "todo": "Bought The cake flour" }, { "_id": "6596c2fd9c807fe0b9fb0a90", "todo": "Restocking the chici powder and vanilla essence." }, { "_id": "6596c30d9c807fe0b9fb0a94", "todo": "Bringing the cake paper." }, { "_id": "6596c31d9c807fe0b9fb0a98", "todo": "Gluten and cream." } ] }
-
- { "message": "ToDo Deleted Successfully!" }
-
- { "userId": "6596c1579c807fe0b9fb0a83" }
- { "message": "All todo's have been deleted" }