We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95b39a5 commit e0a5ee2Copy full SHA for e0a5ee2
todos/routes.js
@@ -115,7 +115,21 @@ router
115
});
116
})
117
.delete((req, res) => {
118
- res.end("delete");
+ console.log(new Date().getTime());
119
+ const params = Object.assign({}, tableParams, {
120
+ Key: {
121
+ id: req.params.id
122
+ }
123
+ });
124
+
125
+ dynamoDb.delete(params, error => {
126
+ if (error) {
127
+ console.error(error);
128
+ res.status(501).send({ error: "Could not delete toto item" });
129
+ } else {
130
+ res.status(204).send();
131
132
133
134
135
routes.use(bodyParser.json({ strict: false }));
0 commit comments